phalconplus Documentation v1.0.0-dev
Source
Class PhalconPlus Base

# Model

Methods

- initialize() : void
- getMessage() : void
- getFirstMessage() : void
- getLastMessage() : void
- createBuilder(string $alias) : Phalcon\Mvc\Model\Query\BuilderInterface
- getInstance() : Phalcon\Mvc\Model
- newInstance() : Phalcon\Mvc\Model
- batchInsert(array $columns, array $rows) : void
- beforeValidationOnCreate() : void
- afterFetch() : void
- beforeCreate() : void
- beforeSave() : void
- findByPagable(variable $pagable, array $params) : void
  find with paginator
- exists() : bool
  Check if a reord is already exists?
- setUpdateCond(array $params) : void
  如果想在更新某条记录的时候额外加入其他条件，可以使用此方法
- setUniqueKeys(array $whereUk) : void
- setUqKeys(array $whereUk) : void
  columnMap field
- _p_buildUkCond(variable $metaData, variable $connection) : void
- toProtoBuffer(variable $columns) : PhalconPlus\Base\ProtoBuffer
- selectReadConnection() : PhalconPlus\Base\AdapterInterface
- zephir_init_properties_PhalconPlus_Base_Model() : void

Methods Details

- public function initialize()
- public function getMessage()
- public function getFirstMessage()
- public function getLastMessage()
- public function createBuilder(string $alias)
- public static function getInstance()
- public static function newInstance()
- public static function batchInsert(array $columns, array $rows)
- public function beforeValidationOnCreate()
- public function afterFetch()
- public function beforeCreate()
- public function beforeSave()
- public function findByPagable(variable $pagable, array $params)
  find with paginator
  - params["columns"] - params["conditions"] - params["bind"] - params["hydration"]: \Phalcon\Mvc\Model\Resultset::HYDRATE_OBJECTS | HYDRATE_ARRAYS | HYDRATE_RECORDS
- public function exists()
  Check if a reord is already exists?
- public function setUpdateCond(array $params)
  如果想在更新某条记录的时候额外加入其他条件，可以使用此方法
  where = [ 'id > ?', // 占位符仅支持?形式，不支持:placeHolder这种形式 'bind' => [ 14 ] ];
- public function setUniqueKeys(array $whereUk)
- public function setUqKeys(array $whereUk)
  columnMap field
- protected function _p_buildUkCond(variable $metaData, variable $connection)
- public function toProtoBuffer(variable $columns)
- public function selectReadConnection()
  Once in a transaction, a read-sql should always use the write connection for the data consistency. But, if you do not like this, you can rewrite this method Or use <\PhalconPlus\Db\UnitOfWork>
- internal function zephir_init_properties_PhalconPlus_Base_Model()