检查整数
@return $this
422955
public function integer() {
        $this->check_role = 'integer';
        $result = $this->filter($this->value, FILTER_VALIDATE_INT);
        $this->checkResult($result);
        return $this;
    }
259862
public function reset() : self
    {
        $this->where = [];
        $this->joins = [];
        $this->group = [];
        $this->withr = [];
        $this->order = [];
        $this->having = [];
        $this->aliases = [];
        $this->li_of = [0,0,0];
        $this->qiterator = null;
        return $this;
    }
389832
public function setSelect() {
        $select = $this->_options['select'];
        if (!$select) {
            $select = $this->getModel()->select();
        }
        if ($this->_options['conditions']) {
            $select->where($this->_options['conditions']);
        }       
        if ($this->_options['order']) {
            $select->order($this->_options['order']);
        }
        $this->_select = $select;
        return $this;
    }
405701
public function commit() {
		
		if(null === $this -> connection) {
			$this -> connect();
		}

		$this -> connection -> commit();
		$this -> connection -> autocommit(true);

		return $this;
	}
885285
public function start()
    {
        if (!$this->httpEnable) {
            parent::start();
            return $this;
        }

        if (static::mode == 'console') {
            $this->beforeSwooleStart();
            $this->onWorkerStart(null, null);
        } else {
            //开启一个http服务器
            $mode = $this->config->get('server.mode', SWOOLE_PROCESS);
            $this->server = new \swoole_http_server($this->httpSocketName, $this->httpPort, $mode);
            $this->server->on('Start', [$this, 'onStart']);
            $this->server->on('WorkerStart', [$this, 'onWorkerStart']);
            $this->server->on('WorkerStop', [$this, 'onWorkerStop']);
            $this->server->on('Task', [$this, 'onTask']);
            $this->server->on('Finish', [$this, 'onFinish']);
            $this->server->on('PipeMessage', [$this, 'onPipeMessage']);
            $this->server->on('WorkerError', [$this, 'onWorkerError']);
            $this->server->on('ManagerStart', [$this, 'onManagerStart']);
            $this->server->on('ManagerStop', [$this, 'onManagerStop']);
            $this->server->on('request', [$this, 'onRequest']);
            $this->server->on('Shutdown', [$this, 'onShutdown']);
            $set = $this->setServerSet();
            $set['daemonize'] = self::$daemonize ? 1 : 0;
            $this->server->set($set);
            $this->beforeSwooleStart();
            $this->server->start();
        }

        return $this;
    }
285960
public function save()
        {
            if (count($this->_items)) {
                foreach($this->_items as $item) {
                    if(true === $item->exists()) {
                        $item->save();
                    }
                }
            }

            return $this;
        }
1029246
public function select()
    {
        $this->db->disconnect();

        $this->db->setDatabaseName($this->getName());

        return $this;
    }
1179769
public function setActive() {
		if (! $this->_active) {
			$this->addClass(self::CLASS_ACTIVE);
			$this->_active = true;
		}
		
		return $this;
	}
784332
public function notnull()
    {
        $i = Collection::count(self::$colmuns) - 1;
        self::$colmuns[$i] .= ' not null';
        //
        return $this;
    }
597772
public function row() {
        $this->rows[] = [];
        $this->currentRow =& $this->rows[count($this->rows) - 1];
        return $this;
    }
622202
public function delete()
    {
        $this->eventsManager->fireEvent('model:beforeDelete', $this);

        static::query(null, $this)->where($this->_getPrimaryKeyValuePairs())->delete();

        $this->eventsManager->fireEvent('model:afterDelete', $this);

        return $this;
    }
855915
public function start()
    {
        foreach ($this->items as $run) {
            if (!$run->hasStarted()) {
                $run->start();
            }
        }
        return $this;
    }
444812
public function init()
    {
        foreach ($this->dynamic as $key => $data) {
            $field = &$this->items[$key];

            foreach ($data as $property => $call) {
                $action = 'dynamic' . ucfirst($call['action']);

                if (method_exists($this, $action)) {
                    $this->{$action}($field, $property, $call);
                }
            }
        }

        return $this;
    }
1289374
public function tick()
    {
        if ($this->ticksUntilUnload !== null) {
            --$this->ticksUntilUnload;
            if ($this->ticksUntilUnload < 1) {
                $this->unloadDoctrineEntities();
                $this->ticksUntilUnload = $this->unloadDoctrineEveryTick;
            }
        }

        return $this;
    }
652917
public function refresh()
    {
        $behaviors = $this->owner->behaviors();
        $settings = $behaviors[$this->getName()];
        foreach ($settings as $attribute=>$value) {
            if (in_array($attribute, array('class'))) {
                continue;
            }
            $this->$attribute = $value;
        }
        return $this;
    }
547158
public function setAttributes()
    {
        $attributes = func_get_args();
        if (count($attributes)) {
            if (count($attributes) == 1 && is_array($attributes[0])) {
                $attributes = $attributes[0];
            }
            $this->attributes = $attributes;
        }

        return $this;
    }
219153
public function init() {
        $options = $this->getServiceLocator()->get('search.options');
        $this->setOptions($options);
        $this->driverName = $options['driver'];
        $this->setDriverEscaper($this->getServiceLocator()->get($this->driverList[$this->driverName]));
        
        return $this;
    }