__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
string
The method name
string
The method args
\BadMethodCallException |
---|
mixed
Based on static::$return_type__construct(array $data)
array
The data array
__get(string $property) : mixed
string
The property name
mixed
__isset(string $property) : bool
string
The property name
bool
whether or not the property exists__set(string $property, mixed $value) : void
string
The property name
mixed
The property value
__unset(string $property)
string
The property name
count(string $column, bool $distinct, array $where, string $group_by) : int
string
Column to count by
bool
Whether to count only distinct rows (by column)
array
Query where clause(s)
string
Column to group by
\FuelException |
---|
int
The number of rows OR falsecurrent()
delete() : mixed
mixed
Rows affectedfind(array $config, string $key) : array | null
array
array containing query settings
string
optional array index key
array
null
an array containing models or null if none are foundfind_all(int $limit, int $offset) : null | object
Optionally limited and offset.
int
Number of records to return
int
What record to start at
null
object
Null 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.
string
The column to search
mixed
The value to find
string
The operator to search with
int
Number of records to return
int
What record to start at
null
object
Null if not found or an array of Model objectfind_by_pk(mixed $value) : null | object
mixed
The primary key value to find
null
object
Either null or a new Model objectfind_one_by(mixed $column, mixed $value, string $operator) : null | object
mixed
The column to search
mixed
The value to find
string
null
object
Either 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 |
---|
bool
null
Whether 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 |
---|
bool
null
Whether this is a new record
key()
next()
offsetExists(string $offset) : bool
string
class property
bool
offsetGet(string $offset) : mixed
string
class property
mixed
offsetSet(string $offset, string $value) : void
string
class property
string
value
offsetUnset(string $offset) : void
string
class property
rewind()
sanitize() : \Fuel\Core\Model_Crud
fluent | This method is part of a fluent interface and will return the same instance |
---|
sanitized() : bool
bool
save(bool $validate) : array | int
Sets the default values if set.
bool
whether to validate the input
\Exception |
---|
array
int
Rows affected and or insert IDserialize() : array
array
model dataset(array $data) : \Fuel\Core\Model_Crud
fluent | This method is part of a fluent interface and will return the same instance |
---|
array
The data
to_array() : array
array
unsanitize() : \Fuel\Core\Model_Crud
fluent | This method is part of a fluent interface and will return the same instance |
---|
unserialize(string $data) : array
string
array
model datavalid()
validates() : bool
bool
whether the instance passed validationvalidation() : object
object
Validation objectget_connection(boolean $writable) : mixed
boolean
Get a writable connection
mixed
Database profile name (string) or Database_Connection (object)post_delete(int $result) : int
int
Number of affected rows
int
post_find(array | null $result) : array | null
$result will be null if 0 rows are returned.
array
null
the result array or null when there was no result
array
null
post_save(array $result) : array
array
insert id and number of affected rows
array
post_update(int $result) : int
int
Number of affected rows
int
post_validate(bool $result) : bool
bool
Validation result
bool
pre_delete(\Fuel\Core\Database_Query $query) : void
pre_update(\Fuel\Core\Database_Query $query) : void
pre_validate(array $data) : array
array
The validation data
array
prep_values(array $values) : array
array
input array
array
primary_key() : string
string
run_validation(array $vars) : bool
array
array to validate
bool
validation result$_data : array
$_is_frozen : bool
$_is_new : bool
$_sanitization_enabled : bool
$_validation : object