Methods summary
public
|
#
__construct( array $fields = array() )
Constructor. Can be called directly by a programmer, or is
called in Horde_Rdo_Mapper::map(). Takes an associative array
of initial object values.
Constructor. Can be called directly by a programmer, or is
called in Horde_Rdo_Mapper::map(). Takes an associative array
of initial object values.
Parameters
- $fields
- Initial values for the new object.
See
|
public
|
#
__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.
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.
|
public
mixed
|
#
__get( string $field )
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.
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.
Parameters
- $field
- The name of the field to access.
Returns
mixed The value of $field or null.
|
public
|
#
offsetGet( mixed $field )
Implements getter for ArrayAccess interface.
Implements getter for ArrayAccess interface.
See
Implementation of
ArrayAccess::offsetGet()
|
public
|
#
__set( string $field, mixed $value )
Set a field's value.
Parameters
- $field
- The field to set
- $value
- The field's new value
|
public
|
#
offsetSet( mixed $field, mixed $value )
Implements setter for ArrayAccess interface.
Implements setter for ArrayAccess interface.
See
Implementation of
ArrayAccess::offsetSet()
|
public
|
#
__isset( string $field )
Allow using isset($rdo->foo) to check for field or
relationship presence.
Allow using isset($rdo->foo) to check for field or
relationship presence.
Parameters
- $field
- The field name to check existence of.
|
public
|
#
offsetExists( mixed $field )
Implements isset() for ArrayAccess interface.
Implements isset() for ArrayAccess interface.
See
Implementation of
ArrayAccess::offsetExists()
|
public
|
#
__unset( string $field )
Allow using unset($rdo->foo) to unset a basic
field. Relationships cannot be unset in this way.
Allow using unset($rdo->foo) to unset a basic
field. Relationships cannot be unset in this way.
Parameters
- $field
- The field name to unset.
|
public
|
#
offsetUnset( mixed $field )
Implements unset() for ArrayAccess interface.
Implements unset() for ArrayAccess interface.
See
Implementation of
ArrayAccess::offsetUnset()
|
public
|
#
setFields( array $fields = array() )
Set field values for the object
Set field values for the object
Parameters
- $fields
- Initial values for the new object.
See
|
public
Horde_Rdo_Iterator
|
#
getIterator( )
Implement the IteratorAggregate interface. Looping over an Rdo
object goes through each property of the object in turn.
Implement the IteratorAggregate interface. Looping over an Rdo
object goes through each property of the object in turn.
Returns
Implementation of
IteratorAggregate::getIterator()
|
public
Horde_Rdo_Mapper
|
#
getMapper( )
Get a Mapper instance that can be used to manage this
object. The Mapper instance can come from a few places:
Get a Mapper instance that can be used to manage this
object. The Mapper instance can come from a few places:
If the class Mapper exists, it will be used automatically.
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.
The programmer can call $rdoObject->setMapper($mapper) to provide a mapper object.
A Horde_Rdo_Exception will be thrown if none of these
conditions are met.
Returns
|
public
|
#
setMapper( Horde_Rdo_Mapper $mapper )
Associate this Rdo object with the Mapper instance that will
manage it. Called automatically by Horde_Rdo_Mapper:map().
Associate this Rdo object with the Mapper instance that will
manage it. Called automatically by Horde_Rdo_Mapper:map().
Parameters
- $mapper
- The Mapper to manage this Rdo object.
See
|
public
boolean
|
#
save( )
Save any changes to the backend.
Save any changes to the backend.
Returns
boolean Success.
|
public
boolean
|
#
delete( )
Delete this object from the backend.
Delete this object from the backend.
Returns
boolean Success or failure.
|