__call()
__callStatic()
__clone()
__construct()
__get()
__isset()
__set()
__unset()
_relate()
_update_original()
_update_original_relations()
cached_object()
condition()
connection()
count()
current()
delete()
disable_event()
enable_event()
find()
flush_cache()
forge()
freeze()
from_array()
frozen()
get()
get_diff()
get_filtered_properties()
get_pk_assoc()
get_to_array_exclude()
is_changed()
is_fetched()
is_new()
key()
max()
min()
next()
observe()
observers()
offsetExists()
offsetGet()
offsetSet()
offsetUnset()
primary_key()
properties()
property()
query()
register_observer()
related_class()
relations()
reset()
rewind()
sanitize()
sanitized()
save()
set()
set_connection()
set_form_fields()
set_write_connection()
table()
to_object()
unfreeze()
unregister_observer()
unsanitize()
valid()
views()
_get_eav()
_sanitize()
_set_eav()
add_primary_keys_to_where()
create()
delete_self()
should_cascade_delete()
update()
$_cached_objects
$_connection
$_custom_data
$_data
$_data_relations
$_disabled_events
$_frozen
$_is_new
$_iterable
$_observers_cached
$_original
$_original_relations
$_primary_key
$_properties_cached
$_relations_cached
$_reset_relations
$_sanitization_enabled
$_table_names_cached
$_to_array_exclude
$_valid_relations
$_view
$_views_cached
$_write_connection
$to_array_references
__call(string $method, array $args) : mixed
__callStatic($method, $args)
__clone()
__construct($data, $new, $view, $cache)
array
bool
__get($property) : mixed
string
mixed
__isset(string $property) : bool
string
bool
__unset(string $property)
string
_relate(array | bool | null $rels) : void | array
array
bool
null
\FuelException |
Invalid input for _relate(), should be an array |
---|---|
\Orm\FrozenObject |
No changes allowed |
void
array
_update_original(array | null $original)
array
null
_update_original_relations($relations)
cached_object(array | \Orm\Model $obj, null | string $class) : \Orm\Model | false
condition(string $type) : array
string
type of condition to return
array
connection(bool $writeable) : null | string
bool
if true return the writeable connection (if set)
null
string
count(array $options) : int
array
int
current()
delete(mixed $cascade, bool $use_transaction) : \Orm\Model
mixed
null = use default config, bool = force/prevent cascade, array cascades only the relations that are in the array
bool
\Exception |
---|
\Orm\Model
this instance as a new object without primary key(s)disable_event(string $event) : void
string
event to disable
enable_event(string $event) : void
string
class name of the observer (including namespace)
flush_cache(null | string | object $class)
null
string
object
forge($data, $new, $view, $cache)
freeze()
from_array(array $values) : \Orm\Model
array
assoc array with named values to store in the object
\Orm\Model
this instance as a new object without primary key(s)frozen() : boolean
boolean
get(string $property, array $conditions) : mixed
Gets a property or relation from the object
access | public |
---|
string
array
mixed
get_diff() : array
Note: relations are given as single or array of imploded pks
array
get_filtered_properties() : array
array
get_pk_assoc() : array
array
get_to_array_exclude() : array
array
is_changed(string | array $property) : bool
is_fetched($relation)
is_new()
key()
max($key) : bool | int
mixed
bool
int
Maximum value or falsemin($key) : object | array
mixed
object
array
next()
observe($event)
string
observers(string $specific, mixed $default) : array
string
specific observer to retrieve info of, allows direct param access by using dot notation
mixed
default return value when specific key wasn't found
array
offsetExists($offset)
offsetGet($offset)
offsetSet($offset, $value)
offsetUnset($offset)
primary_key() : array
array
properties() : array
\FuelException |
Listing columns failed |
---|
array
property(string $key, mixed $default) : mixed
string
property or property.key
mixed
return value when key not present
mixed
register_observer(string $name, mixed $options) : void
string
class name of the observer (including namespace)
mixed
observer options
relations(bool $specific) : \Orm\HasOne | \Orm\HasMany | \Orm\ManyMany | \Orm\Belongsto | \Orm\HasOne[] | \Orm\HasMany[] | \Orm\ManyMany[] | \Orm\Belongsto[]
bool
\Orm\HasOne
\Orm\HasMany
\Orm\ManyMany
\Orm\Belongsto
\Orm\HasOne[]
\Orm\HasMany[]
\Orm\ManyMany[]
\Orm\Belongsto[]
reset()
rewind()
sanitize() : \Orm\Model
fluent | This method is part of a fluent interface and will return the same instance |
---|
sanitized() : bool
bool
save(mixed $cascade, $use_transaction) : bool
mixed
null = use default config, bool = force/prevent cascade, array cascades only the relations that are in the array
bool
set(string | array $property, string $value) : \Orm\Model
Sets a property or relation of the object
access | public |
---|
string
array
string
in case $property is a string
\FuelException |
Primary key on model cannot be changed |
---|---|
\InvalidArgumentException |
You need to pass both a property name and a value to set() |
\Orm\FrozenObject |
No changes allowed |
set_connection(string $connection)
string
set_form_fields(\Orm\Fieldset $form, array | \Orm\Model $instance)
\Orm\Fieldset
Fieldset instance to add fields to
set_write_connection(string $connection)
string
table() : string
string
to_object($custom, $recurse) : object
object
unfreeze()
unregister_observer(string $name) : void
string
class name of the observer (including namespace)
unsanitize() : \Orm\Model
fluent | This method is part of a fluent interface and will return the same instance |
---|
valid()
views() : array
_get_eav($attribute, $isset, $unset) : mixed
Also deals with isset() and unset()
\OutOfBoundsException |
if the defined EAV relation does not exist or of the wrong type |
---|
mixed
_sanitize(string $field, mixed $value) : mixed
string
Name of the property that is being sanitized
mixed
Value to sanitize
mixed
_set_eav(string $attribute, string $value) : mixed
add_primary_keys_to_where(\Orm\Query $query)
\Orm\Query
create()
delete_self() : bool
bool
should_cascade_delete(array $rel) : bool
array
bool
False to stop the relation from being deleted. Works the same as the cascade_delete propertyupdate()
$_cached_objects : array
$_connection : string
$_custom_data : array
$_data : array
$_data_relations : array
$_disabled_events : array
$_frozen : bool
$_is_new : bool
$_iterable
$_observers_cached : array
$_original : array
$_original_relations : array
$_primary_key : array
$_properties_cached : array
$_relations_cached : string
$_reset_relations : array
$_sanitization_enabled : bool
$_table_names_cached : array
$_to_array_exclude : array
$_valid_relations : array
$_view : string
$_views_cached : array
$_write_connection : string
$to_array_references : array