phalconplus Documentation v1.1.0
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
- findByPageable(variable $pagable, array $params) : void
- findByPagable(variable $pagable, array $params) : void
  find with paginator
- exists() : bool
  Check if a reord is already exists?
- setUpdateCond(array $params) : void
- setUpdateCondition(array $params) : void
  如果想在更新某条记录的时候额外加入其他条件，可以使用此方法
- setUqKeys(array $whereUk) : void
- setUniqueKeys(array $whereUk) : void
  columnMap field
- _p_buildUkCond(variable $metaData, variable $connection) : void
- getUniqueFields() : void
- toProtoBuffer(variable $columns) : PhalconPlus\Base\ProtoBuffer
- getReadConnection() : \Phalcon\Db\AdapterInterface
  Gets the connection used to read data for the model
- 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 findByPageable(variable $pagable, array $params)

- public function findByPagable(variable $pagable, array $params)

  find with paginator
  Sorry for the typo with method name

- public function exists()

  Check if a reord is already exists?

- public function setUpdateCond(array $params)

- public function setUpdateCondition(array $params)

  如果想在更新某条记录的时候额外加入其他条件，可以使用此方法
  where = [ 'id > ?', // 占位符仅支持?形式，不支持:placeHolder这种形式 'bind' => [ 14 ] ];

- public function setUqKeys(array $whereUk)

- public function setUniqueKeys(array $whereUk)

  columnMap field

- protected function _p_buildUkCond(variable $metaData, variable $connection)

- public function getUniqueFields()

- public function toProtoBuffer(variable $columns)

- public function getReadConnection()

  Gets the connection used to read data for the model
  Check transaction in writeConnection before `_transaction`

- internal function zephir_init_properties_PhalconPlus_Base_Model()