Class Model
Base class for activerecord models.
- ICanBoogie\Prototyped
- ICanBoogie\ActiveRecord\Table
- ICanBoogie\ActiveRecord\Model implements ArrayAccess
Methods summary
protected
|
|
protected
|
|
protected
|
|
protected
|
|
public
|
#
__construct(
Override the constructor to provide support for the |
public
|
|
public
|
|
protected
string
|
|
protected
string
|
|
public
|
|
public
mixed
|
|
public
boolean
|
|
protected
boolean
|
|
protected
integer
|
|
protected
|
|
protected
|
|
public
boolean
|
|
public
|
|
public
|
|
public
boolean
|
|
public
|
|
public
|
|
protected
|
Methods inherited from ICanBoogie\ActiveRecord\Table
__invoke()
,
assert_has_connection()
,
assert_has_name()
,
assert_has_schema()
,
assert_implements_is_valid()
,
assert_parent_is_valid()
,
construct_with_parent()
,
drop()
,
ensure_has_alias()
,
execute()
,
filter_values()
,
get_alias()
,
get_connection()
,
get_name()
,
get_parent()
,
get_primary()
,
get_schema()
,
get_schema_options()
,
get_unprefixed_name()
,
insert()
,
install()
,
is_installed()
,
lazy_get_extended_schema()
,
lazy_get_select_join()
,
lazy_get_update_join()
,
map_construct_attributes()
,
prepare()
,
query()
,
quote()
,
resolve_statement()
,
save_callback()
,
truncate()
,
uninstall()
,
update()
Magic methods summary
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
boolean
|
|
public
mixed
|
|
public
string
|
|
public
string
|
|
public
string
|
|
public
integer
|
|
public
array
|
|
public
|
|
public
|
|
public
|
|
public
|
Constants summary
string |
ACTIVERECORD_CLASS
|
#
'activerecord_class'
|
string |
BELONGS_TO
|
#
'belongs_to'
|
string |
CLASSNAME
|
#
'class'
|
string |
HAS_MANY
|
#
'has_many'
|
string |
ID
|
#
'id'
|
Constants inherited from ICanBoogie\ActiveRecord\Table
Properties summary
protected
string
|
$activerecord_class
Active record instances class. |
|
protected
array[string]mixed
|
$attributes
Attributes of the model. |
|
protected
|
$parent_model
The parent model of the model. |
|
protected
|
$relations
The relations of this model to other models. |
Properties inherited from ICanBoogie\ActiveRecord\Table
$alias
,
$connection
,
$implements
,
$name
,
$parent
,
$primary
,
$schema
,
$schema_options
,
$select_join
,
$unprefixed_name
,
$update_join
Magic properties
public
|
$activerecord_cache
The cache use to store activerecords. |
public read-only
|
$parent
Parent model. |
public read-only
|
$models
|
public read-only
array
|
$all
Retrieve all the records from the model. |
public read-only
string
|
$activerecord_class
Class of the active records of the model. |
public read-only
integer
|
$count
The number of records of the model. |
public read-only
boolean
|
$exists
Whether the SQL table associated with the model exists. |
public read-only
string
|
$id
The identifier of the model. |
public read-only
|
$one
Retrieve the first record from the mode. |
public read-only
|
$parent_model
The parent model. |
Magic properties inherited from ICanBoogie\ActiveRecord\Table
$alias
,
$connection
,
$extended_schema
,
$name
,
$primary
,
$schema
,
$schema_options
,
$unprefixed_name