Method |
Description |
|
__clone ( ) |
When Rdo objects are cloned, unset the unique id that
identifies them so that they can be modified and saved to the
backend as new objects. If you don't really want a new object,
don't clone. |
|
__construct ( array $fields = [] ) |
Constructor. Can be called directly by a programmer, or is
called in Horde_Rdo_Mapper::map(). Takes an associative array
of initial object values. |
|
__get ( string $field ) : mixed |
Fetch fields that haven't yet been loaded. Lazy-loaded fields
and lazy-loaded relationships are handled this way. Once a
field is retrieved, it is cached in the $_fields array so it
doesn't need to be fetched again. |
|
__isset ( string $field ) |
Allow using isset($rdo->foo) to check for field or
relationship presence. |
|
__set ( string $field, mixed $value ) |
Set a field's value. |
|
__unset ( string $field ) |
Allow using unset($rdo->foo) to unset a basic
field. Relationships cannot be unset in this way. |
|
addRelation ( string $relationship, Horde_Rdo_Base $peer ) |
Adds a relation to one of the relationships defined in the mapper. |
|
delete ( ) : boolean |
Delete this object from the backend. |
|
getIterator ( ) : Horde_Rdo_Iterator |
Implement the IteratorAggregate interface. Looping over an Rdo
object goes through each property of the object in turn. |
|
getMapper ( ) : Horde_Rdo_Mapper |
Get a Mapper instance that can be used to manage this
object. The Mapper instance can come from a few places: |
|
hasRelation ( string $relationship, Horde_Rdo_Base $peer = null ) : boolean |
Checks whether a relation to a peer is defined through one of the
relationships in the mapper. |
|
offsetExists ( $field ) |
Implements isset() for ArrayAccess interface. |
|
offsetGet ( $field ) |
Implements getter for ArrayAccess interface. |
|
offsetSet ( $field, $value ) |
Implements setter for ArrayAccess interface. |
|
offsetUnset ( $field ) |
Implements unset() for ArrayAccess interface. |
|
removeRelation ( string $relationship, Horde_Rdo_Base $peer = null ) : integer |
Removes a relation to one of the relationships defined in the mapper. |
|
save ( ) : boolean |
Save any changes to the backend. |
|
setFields ( array $fields = [] ) |
Set field values for the object |
|
setMapper ( Horde_Rdo_Mapper $mapper ) |
Associate this Rdo object with the Mapper instance that will
manage it. Called automatically by Horde_Rdo_Mapper:map(). |
|
toArray ( boolean $lazy = false, boolean $relationships = false ) : array |
Converts the entity to an Array. |
|