v1.0.0
English

Model.php

system/Model.php
1 class 29 methods

class Model

The Model class extends BaseModel and provides additional convenient features that makes working with a SQL database table less painful. It will: - automatically connect to database - allow intermingling calls to the builder - removes the need to use Result object directly in most cases
__construct (?ConnectionInterface $db = null, ?ValidationInterface $validation = null) public
setTable (string $table) public
doFind (bool $singleton, $id = null) protected
doFindColumn (string $columnName) protected
doFindAll (?int $limit = null, int $offset = 0) protected
doFirst () protected
doInsert (array $row) protected
doInsertBatch (?array $set = null, ?bool $escape = null, int $batchSize = 100, bool $testing = false) protected
doUpdate ($id = null, $row = null) protected
doUpdateBatch (?array $set = null, ?string $index = null, int $batchSize = 100, bool $returnSQL = false) protected
doDelete ($id = null, bool $purge = false) protected
doPurgeDeleted () protected
doOnlyDeleted () protected
doReplace (?array $row = null, bool $returnSQL = false) protected
doErrors () protected
getIdValue ($row) public
chunk (int $size, Closure $userFunc) public
countAllResults (bool $reset = true, bool $test = false) public
builder (?string $table = null) public
set ($key, $value = '', ?bool $escape = null) public
shouldUpdate ($row) protected
insert ($row = null, bool $returnID = true) public
doProtectFieldsForInsert (array $row) protected
update ($id = null, $row = null) public
objectToRawArray ($object, bool $onlyChanged = true, bool $recursive = false) protected
__get (string $name) public
__isset (string $name) public
__call (string $name, array $params) public
checkBuilderMethod (string $name) private
phpDG v1.0.0 Model.php 662 files 498 classes 763 fn
Generated