Method |
Description |
|
__call ( $name, $arguments ) |
|
|
__construct ( ) |
Entity constructor |
|
__get ( $name ) : AbstractAttribute |
This method allows us to use simplified accessor methods. |
|
__set ( $name, $value ) |
This method allows setting attribute values through simple assignment
Ex: $person->name = 'Webiny'; |
|
__toString ( ) : mixed |
Return string representation of entity |
|
attr ( $attribute ) : EntityAttributeBuilder |
|
|
count ( array $conditions = [] ) : integer |
Count records using given criteria |
|
delete ( ) : boolean |
Delete entity |
|
exists ( ) : boolean |
Is this entity already saved? |
|
find ( array $conditions = [], array $order = [], integer $limit, integer $page ) : EntityCollection |
Find entities |
|
findById ( $id ) : null | AbstractEntity |
Find entity by ID |
|
findOne ( array $conditions = [] ) : null | AbstractEntity |
Find entity by array of conditions |
|
getAttribute ( string $attribute ) : AbstractAttribute |
Get entity attribute |
|
getAttributes ( ) : ArrayObject |
Get all entity attributes |
|
getEntityCollection ( ) : string |
Get collection name |
|
getMaskedValue ( ) |
|
|
latest ( integer $limit = 1 ) : mixed | null |
Finds one or more latest entities |
|
offsetExists ( $offset ) |
|
|
offsetGet ( $offset ) |
|
|
offsetSet ( $offset, $value ) |
|
|
offsetUnset ( $offset ) |
|
|
populate ( array $data ) |
Populate entity with given data |
|
random ( array $conditions = [] ) : null | AbstractEntity |
Find a random entity |
|
save ( ) |
Save entity attributes to database |
|
toArray ( string $fields = '' ) : array |
Convert AbstractEntity to array with specified fields. |
|