__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
$block_set_pks
$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
arrayboolnull
\FuelException |
Invalid input for _relate(), should be an array |
|---|---|
\Orm\FrozenObject |
No changes allowed |
voidarray
_update_original(array | null $original)
arraynull
_update_original_relations($relations)
cached_object(array | \Orm\Model $obj, null | string $class) : \Orm\Model | false
condition(string $type) : array
stringtype of condition to return
arrayconnection(bool $writeable) : null | string
boolif true return the writeable connection (if set)
nullstring
count(array $options) : int
array
intcurrent()
delete(mixed $cascade, bool $use_transaction) : \Orm\Model
mixednull = use default config, bool = force/prevent cascade, array cascades only the relations that are in the array
bool
\Exception |
|---|
\Orm\Modelthis instance as a new object without primary key(s)disable_event(string $event) : void
stringevent to disable
enable_event(string $event) : void
stringclass name of the observer (including namespace)
flush_cache(null | string | object $class)
nullstringobject
forge($data, $new, $view, $cache)
freeze()
from_array(array $values) : \Orm\Model
arrayassoc array with named values to store in the object
\Orm\Modelthis instance as a new object without primary key(s)frozen() : boolean
booleanget(string $property, array $conditions) : mixed
Gets a property or relation from the object
| access | public |
|---|
string
array
mixedget_diff() : array
Note: relations are given as single or array of imploded pks
arrayget_filtered_properties() : array
arrayget_pk_assoc() : array
arrayget_to_array_exclude() : array
arrayis_changed(string | array $property) : bool
is_fetched($relation)
is_new()
key()
max($key) : bool | int
mixed
boolintMaximum value or falsemin($key) : object | array
mixed
objectarray
next()
observe($event)
string
observers(string $specific, mixed $default) : array
stringspecific observer to retrieve info of, allows direct param access by using dot notation
mixeddefault return value when specific key wasn't found
arrayoffsetExists($offset)
offsetGet($offset)
offsetSet($offset, $value)
offsetUnset($offset)
primary_key() : array
arrayproperties() : array
\FuelException |
Listing columns failed |
|---|
arrayproperty(string $key, mixed $default) : mixed
stringproperty or property.key
mixedreturn value when key not present
mixedregister_observer(string $name, mixed $options) : void
stringclass name of the observer (including namespace)
mixedobserver 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
boolsave(mixed $cascade, $use_transaction) : bool
mixednull = use default config, bool = force/prevent cascade, array cascades only the relations that are in the array
boolset(string | array $property, string $value) : \Orm\Model
Sets a property or relation of the object
| access | public |
|---|
stringarray
stringin 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\FieldsetFieldset instance to add fields to
set_write_connection(string $connection)
string
table() : string
stringto_object($custom, $recurse) : object
objectunfreeze()
unregister_observer(string $name) : void
stringclass 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
stringName of the property that is being sanitized
mixedValue to sanitize
mixed_set_eav(string $attribute, string $value) : mixed
add_primary_keys_to_where(\Orm\Query $query)
\Orm\Query
create()
delete_self() : bool
boolshould_cascade_delete(array $rel) : bool
array
boolFalse 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
$block_set_pks : bool
$to_array_references : array