$_mapper
$_mapper : \Horde_Rdo_Mapper
The Horde_Rdo_Mapper instance associated with this Rdo object. The Mapper takes care of all backend access.
Horde_Rdo_Base abstract class (Rampage Data Objects). Entity classes extend this baseline.
$_mapper : \Horde_Rdo_Mapper
The Horde_Rdo_Mapper instance associated with this Rdo object. The Mapper takes care of all backend access.
__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.
string | $field | The name of the field to access. |
The value of $field or null.
getIterator() : \Horde_Rdo_Iterator
Implement the IteratorAggregate interface. Looping over an Rdo object goes through each property of the object in turn.
The Iterator instance.
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:
If the class
Any Rdo instance created with Horde_Rdo_Mapper::map() will have a $mapper object set automatically.
Subclasses can override getMapper() to return the correct mapper object.
A Horde_Rdo_Exception will be thrown if none of these conditions are met.
The Mapper instance managing this 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().
\Horde_Rdo_Mapper | $mapper | The Mapper to manage this Rdo object. |
addRelation(string $relationship, \Horde_Rdo_Base $peer)
Adds a relation to one of the relationships defined in the mapper.
This is a proxy to the mapper's addRelation() method.
string | $relationship | The relationship key in the mapper. |
\Horde_Rdo_Base | $peer | The object to add the relation. |
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.
string | $relationship | The relationship key in the mapper. |
\Horde_Rdo_Base | $peer | The object to check for the relation. If this is null, check if there is any peer for this relation. |
True if related.
removeRelation(string $relationship, \Horde_Rdo_Base $peer = null) : integer
Removes a relation to one of the relationships defined in the mapper.
This is a proxy to the mapper's removeRelation method.
string | $relationship | The relationship key in the mapper |
\Horde_Rdo_Base | $peer | The object to remove from the relation |
The number of relations affected
toArray(boolean $lazy = false, boolean $relationships = false) : array
Converts the entity to an Array.
This method can be used when handing it over to Horde_Variables so that the database is not unnecessarily queried because of lazyFields/lazyRelationships.
boolean | $lazy | Whether lazy elements should be added. |
boolean | $relationships | Whether relationships should be added. |
All selected fields and relationships.