__callStatic()
__construct()
__get()
__isset()
__set()
__unset()
count()
current()
delete()
find()
find_all()
find_by()
find_by_pk()
find_one_by()
forge()
frozen()
is_new()
key()
next()
offsetExists()
offsetGet()
offsetSet()
offsetUnset()
rewind()
sanitize()
sanitized()
save()
serialize()
set()
to_array()
unsanitize()
unserialize()
valid()
validates()
validation()
get_connection()
post_delete()
post_find()
post_save()
post_update()
post_validate()
pre_delete()
pre_find()
pre_save()
pre_update()
pre_validate()
prep_values()
primary_key()
run_validation()
$_data
$_is_frozen
$_is_new
$_sanitization_enabled
$_validation
__callStatic(string $name, string $args) : mixed
stringThe method name
stringThe method args
\BadMethodCallException |
|---|
mixedBased on static::$return_type__construct(array $data)
arrayThe data array
__get(string $property) : mixed
stringThe property name
mixed__isset(string $property) : bool
stringThe property name
boolwhether or not the property exists__set(string $property, mixed $value) : void
stringThe property name
mixedThe property value
__unset(string $property)
stringThe property name
count(string $column, bool $distinct, array $where, string $group_by) : int
stringColumn to count by
boolWhether to count only distinct rows (by column)
arrayQuery where clause(s)
stringColumn to group by
\FuelException |
|---|
intThe number of rows OR falsecurrent()
delete() : mixed
mixedRows affectedfind(array $config, string $key) : array | null
arrayarray containing query settings
stringoptional array index key
arraynullan array containing models or null if none are foundfind_all(int $limit, int $offset) : null | object
Optionally limited and offset.
intNumber of records to return
intWhat record to start at
nullobjectNull if not found or an array of Model objectfind_by(string $column, mixed $value, string $operator, int $limit, int $offset) : null | object
Optionally limited and offset.
stringThe column to search
mixedThe value to find
stringThe operator to search with
intNumber of records to return
intWhat record to start at
nullobjectNull if not found or an array of Model objectfind_by_pk(mixed $value) : null | object
mixedThe primary key value to find
nullobjectEither null or a new Model objectfind_one_by(mixed $column, mixed $value, string $operator) : null | object
mixedThe column to search
mixedThe value to find
string
nullobjectEither null or a new Model objectfrozen(bool | null $frozen) : bool | \Fuel\Core\Model_Crud
| fluent | This method is part of a fluent interface and will return the same instance |
|---|
boolnullWhether this is a frozen record
is_new(bool | null $new) : bool | \Fuel\Core\Model_Crud
| fluent | This method is part of a fluent interface and will return the same instance |
|---|
boolnullWhether this is a new record
key()
next()
offsetExists(string $offset) : bool
stringclass property
booloffsetGet(string $offset) : mixed
stringclass property
mixedoffsetSet(string $offset, string $value) : void
stringclass property
stringvalue
offsetUnset(string $offset) : void
stringclass property
rewind()
sanitize() : \Fuel\Core\Model_Crud
| fluent | This method is part of a fluent interface and will return the same instance |
|---|
sanitized() : bool
boolsave(bool $validate) : array | int
Sets the default values if set.
boolwhether to validate the input
\Exception |
|---|
arrayintRows affected and or insert IDserialize() : array
arraymodel dataset(array $data) : \Fuel\Core\Model_Crud
| fluent | This method is part of a fluent interface and will return the same instance |
|---|
arrayThe data
to_array() : array
arrayunsanitize() : \Fuel\Core\Model_Crud
| fluent | This method is part of a fluent interface and will return the same instance |
|---|
unserialize(string $data) : array
string
arraymodel datavalid()
validates() : bool
boolwhether the instance passed validationvalidation() : object
objectValidation objectget_connection(boolean $writable) : mixed
booleanGet a writable connection
mixedDatabase profile name (string) or Database_Connection (object)post_delete(int $result) : int
intNumber of affected rows
intpost_find(array | null $result) : array | null
$result will be null if 0 rows are returned.
arraynullthe result array or null when there was no result
arraynull
post_save(array $result) : array
arrayinsert id and number of affected rows
arraypost_update(int $result) : int
intNumber of affected rows
intpost_validate(bool $result) : bool
boolValidation result
boolpre_delete(\Fuel\Core\Database_Query $query) : void
pre_update(\Fuel\Core\Database_Query $query) : void
pre_validate(array $data) : array
arrayThe validation data
arrayprep_values(array $values) : array
arrayinput array
arrayprimary_key() : string
stringrun_validation(array $vars) : bool
arrayarray to validate
boolvalidation result$_data : array
$_is_frozen : bool
$_is_new : bool
$_sanitization_enabled : bool
$_validation : object