删除所有缓存
@return boolean
359617
public static function flush()
    {
        $instance = self::getInstance();
        $glob = @glob(self::cacheDir() . $instance->_options['file_name_prefix'] . '--*');

        if (empty($glob)) {
            return false;
        }

        foreach ($glob as $v) {
            $fileName = basename($v);
            $id = $instance->_fileNameToId($fileName);
            $instance->delete($id);
        }
        return true;
    }
278131
public function all()
    {
        $results = array();

        foreach ($this->events as $events) {
            $results = array_merge($results, $events);
        }

        return $results;
    }
1305195
public function all()
	{
		$this->copy();

		$this->read();

		$this->write();

		$this->setSeeded(count($this->getFiles()));

		return true;
	}
1019249
public function valid()
    {
        if (!isset($this->_results[$this->key()])) {
            return false;
        }

        $this->_current = $this->_results[$this->key()];

        return true;
    }
854126
public function validate()
    {
        if (!$this->getValidator()->validate($this, $this->_action)) {
            $this->_errors = $this->getValidator()->getErrors();
            return false;
        }
        return true;
    }
932048
public function validate()
    {
        $errors = [];

        foreach ($this->fields as $field) {
            $result = $field->validate();

            if ($result->isFailure()) {
                $errors[] = $result;
            }
        }

        if ($errors) {
            $this->setErrors($errors);

            return false;
        }

        return true;
    }
316093
public function getGroups()
	{
		if (!is_array($this->_xml))
		{

			return false;
		}

		$results = array();
		foreach ($this->_xml as $name => $group)
		{
			$results[$name] = $this->getNumParams($name);
		}

		return $results;
	}
130988
public function getAccountList()
    {
        $result = $this->wechat->httpGet(self::WECHAT_ACCOUNT_LIST_GET_PREFIX, [
            'access_token' => $this->wechat->getAccessToken()
        ]);
        return isset($result['kf_list']) ? $result['kf_list'] : false;
    }
1243644
public function hasContent() {

    if (count($this->getCategories()) == 0) {
      return FALSE;
    }

    if (count($this->getAllChildren()) == 0) {
      return FALSE;
    }

    return TRUE;
  }
54255
public function exists()
    {
        if (! array_key_exists($this->primaryKey, $this->attributes)) {
            return false;
        }

        return ! empty($this->attributes[$this->primaryKey]);
    }
1040684
public function validate()
    {
        $this->_errors = [];
        $success = true;
        foreach ($this->fields as $name => $field) {
            /** @var $field Field */
            if (!$field->validate($this, $this->getExtraValidatorFor($name))) {
                $success = false;
            }
        }

        return $success && count($this->_errors) === 0;
    }
1293044
public function validate()
    {
        $validator = Validator::make($this->toArray(), $this->rules,
            $this->messages);
        if ($validator->fails()) {
            $this->errors = $validator->messages();

            return false;
        } else return true;
    }
830953
public function isEmpty()
    {
        if (parent::isEmpty()) {
            return true;
        }

        if (null === $this->read()) {
            $this->clear();

            return true;
        }

        return false;
    }
294525
public function delete()
    {
        foreach ($this->value as $index => $item) {
            $item->delete();
            unset($this->value[$index]);
        }

        return true;
    }
416785
public function all()
    {
        $table = trim(self::$table);
        if (!empty($table)) {
            $query = /** @lang text */
                "SELECT * FROM {$table}";


            if(!empty($this->groupby)){
                $query.=' GROUP BY '.$this->groupby;
            }

            if (!empty($this->order)) {
                $query .= $this->order;
            }


            //execute the query and return the data or error message
              return  $this->fetch($query);


        } else {
            static::$response["status"] = "error";
            static::$response["response"] = "Table name cannot be empty";
            static::$response["code"] = 5000;
            return static::terminate(static::$response);
        }
    }
380969
public function first()
    {
        $results = $this->get();

        if (is_array($results) && array_key_exists(0, $results)) {
            return $results[0];
        }

        // No entries were returned, return false
        return false;
    }
842124
public static function all()
    {
        return array(
            self::ENABLED,
            self::DISABLED,
            self::TYPE_NOT_FOUND,
            self::TYPE_NOT_ENABLED,
            self::INVALID,
        );
    }