判断当前回复是否来自关键字

@return bool
433333
public function isFromKeyword()
    {
        // 未加载,说明未匹配到任何关键字
        if (!$this->loaded) {
            return false;
        }

        // 已加载,但id为空,说明未匹配到任何关键字
        if ($this->loaded && !$this['id']) {
            return false;
        }

        // 如果是默认回复,说明未匹配到任何关键字
        if ($this['id'] == 'default') {
            return false;
        }

        return true;
    }
396825
public function current()
    {
        $values = $this->convertToArray(parent::current(), ':');

        $cntHeader = count($this->header);
        $cntValues = count($values);

        // ignore if more data received then we have headers
        if (empty($this->header) || $cntHeader < $cntValues) {
            return false;
        }

        // correct data
        if ($cntHeader > $cntValues) {
            $values = $this->fixData($values);
        }

        return array_combine($this->header, $values);
    }
763659
public static function getCurrent()
    {
        $class = get_called_class();
        if (Session::get('user')) {
            return $class::search()->where('user_id', Session::get('user')->user_id)->execOne();
        }
        return false;
    }
1216358
public function save()
    {
        if (!empty($this->log)) {

            if (!$this->check($this->config)) {
                // 检测日志写入权限
                return false;
            }

            if (empty($this->config['level'])) {
                // 获取全部日志
                $log = $this->log;
                if (!$this->config['debug'] && isset($log['debug'])) {
                    unset($log['debug']);
                }
            } else {
                // 记录允许级别
                $log = [];
                foreach ($this->config['level'] as $level) {
                    if (isset($this->log[$level])) {
                        $log[$level] = $this->log[$level];
                    }
                }
            }

            $result = $this->driver->save($log);
            if ($result) {
                $this->log = [];
            }

            return $result;
        }

        return true;
    }
1043604
public function last() {
        if ($this->count()) {
            $this->current = $this->count() - 1;
            return $this->get($this->count() - 1);
        }
    }
1167142
public function delete()
    {
        $result = false;

        if ($this->isConnected())
        {
            if (!$this->isNew()) {
                $result = $this->getTable()->delete($this);
            }
        }

        return (bool) $result;
    }
47991
public function validates()
	{
		if ( ! isset(static::$_rules) or count(static::$_rules) < 0)
		{
			return true;
		}

		$vars = $this->_data;

		// Set default if there are any
		isset(static::$_defaults) and $vars = $vars + static::$_defaults;
		$vars = $this->pre_validate($vars);

		return $this->run_validation($vars);
	}
1279705
public function current()
    {
        if (is_null($this->current)) {
            $this->current = current($this->branch);
        }
        if ($this->current instanceof RecursiveLeafInterface) {
            return $this->current->current();
        }

        return false;
    }
1348557
protected function before()
    {
        $args = func_get_args();
        $op = array_shift($args);

        $property = 'hooksBefore' . $op;

        // 如果存在前置钩子
        foreach ($this->$property as $func) {
            // 执行前置 检查,
            $ret = call_user_func_array($func, $args);

            //检查失败则不再继续
            if ($ret === Table::INTERRUPT) {
                return $ret;
            }
            $args = $ret;
        }

        // 所有检查通过
        return $args;
    }
67697
public function delete()
    {
        if (!$this->exists || false === $this->trigger('before_delete')) {
            return false;
        }

        // 读取更新条件
        $where = $this->getWhere();

        $db = $this->db(false);
        $db->startTrans();

        try {
            // 删除当前模型数据
            $db->where($where)->delete();

            // 关联删除
            if (!empty($this->relationWrite)) {
                $this->autoRelationDelete();
            }

            $db->commit();

            $this->trigger('after_delete');

            $this->exists = false;

            return true;
        } catch (\Exception $e) {
            $db->rollback();
            throw $e;
        }
    }
1212463
public function current()
    {
        $sKey = key($this->values);

        return (true === isset($this->values[$sKey])) ? $this->values[$sKey] : null;
    }
502927
public function hasNext()
    {
        if (parent::hasNext()
            && ($this->getItemPosition() < ($this->getItemOffset() + $this->getItemCount()) - 1)
        ) {
            return true;
        }
        return false;
    }
465438
public function current()
    {
        if (array_key_exists($this->position, $this->results)) {
            return $this->results[$this->position];
        }
    }
480425
function prev(){
		if( ! $this->length ){
			return false;
		}
		$p = $this->p - 1;
		if( !isset($this->children[$p]) ){
			$this->p = 0;
			return false;
		}
		$this->p = $p;
		return $this->children[$p];
	}
206118
public function hasPrevPost()
    {
        return ($this->prevPost && $this->prevPost->ID !== $this->get('ID')) ? true : false;
    }
912831
public function current()
    {
        return isset($this->items[$this->counter]) ? $this->items[$this->counter] : false;
    }
253621
public function valid()
    {
        if (!$this->splFileObject->valid()) {
            return false;
        }

        if ($this->splFileObject->key() === 0) {
            $this->splFileObject->next();
        }

        $current = $this->splFileObject->current();

        return $current <> [null];
    }