Abstract Class Horde_Rdo_Base

Description

Implements interfaces:

  • IteratorAggregate (internal interface)

Horde_Rdo_Base abstract class (Rampage Data Objects). Entity classes extend this baseline.

  • abstract:

Located in /Rdo/lib/Horde/Rdo/Base.php (line 14)


	
			
Direct descendents
Class Description
 class Item Items
 class Dependency Dependencies
 class Calendar Calendars
 class Resource Resources
 class ResourceAvailability ResourceAvailability
 class Task
 class User
 class Proxy This class will stand in for our table for generating the Model.
Variable Summary
Method Summary
 Horde_Rdo_Base __construct ([array $fields = array()])
 boolean delete ()
 boolean save ()
 void setMapper (Horde_Rdo_Mapper $mapper)
 array _fillPlaceholders (array $query)
 void __clone ()
 mixed __get (string $field)
 void __isset (string $field)
 void __set (string $field, mixed $value)
 void __unset (string $field)
Variables
array $_fields = array() (line 30)

This object's fields.

  • access: protected
Horde_Rdo_Mapper $_mapper (line 23)

The Horde_Rdo_Mapper instance associated with this Rdo object. The Mapper takes care of all backend access.

Methods
Constructor __construct (line 41)

Constructor. Can be called directly by a programmer, or is called in Horde_Rdo_Mapper::map(). Takes an associative array of initial object values.

Horde_Rdo_Base __construct ([array $fields = array()])
  • array $fields: Initial values for the new object.
delete (line 282)

Delete this object from the backend.

  • return: Success or failure.
  • access: public
boolean delete ()
getIterator (line 214)

Implement the IteratorAggregate interface. Looping over an Rdo object goes through each property of the object in turn.

  • return: The Iterator instance.
  • access: public
Horde_Rdo_Iterator getIterator ()

Implementation of:
IteratorAggregate::getIterator
getMapper (line 240)

Get a Mapper instance that can be used to manage this object. The Mapper instance can come from a few places:

  • If the class <RdoClassName>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.

  • return: The Mapper instance managing this object.
  • access: public
Horde_Rdo_Mapper getMapper ()
save (line 272)

Save any changes to the backend.

  • return: Success.
  • access: public
boolean save ()
setMapper (line 262)

Associate this Rdo object with the Mapper instance that will manage it. Called automatically by Horde_Rdo_Mapper:map().

void setMapper (Horde_Rdo_Mapper $mapper)
_fillPlaceholders (line 295)

Take a query array and replace @field@ placeholders with values from this object.

  • return: The query with placeholders filled in.
  • access: protected
array _fillPlaceholders (array $query)
  • array $query: The query to process placeholders on.
__clone (line 52)

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.

  • access: public
void __clone ()
__get (line 70)

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.

  • return: The value of $field or null.
  • access: public
mixed __get (string $field)
  • string $field: The name of the field to access.
__isset (line 186)

Allow using isset($rdo->foo) to check for field or relationship presence.

  • access: public
void __isset (string $field)
  • string $field: The field name to check existence of.
__set (line 166)

Set a field's value.

  • access: public
void __set (string $field, mixed $value)
  • string $field: The field to set
  • mixed $value: The field's new value
__unset (line 201)

Allow using unset($rdo->foo) to unset a basic field. Relationships cannot be unset in this way.

  • access: public
void __unset (string $field)
  • string $field: The field name to unset.

Documentation generated on Sun, 30 Jan 2011 05:15:26 +0000 by phpDocumentor 1.4.3