$driver
$driver : \Turba_Driver
Underlying driver.
A base implementation for Turba objects - people, groups, restaurants, etc.
$driver : \Turba_Driver
Underlying driver.
__construct(\Turba_Driver $driver, array $attributes = array(), array $options = array())
Constructs a new Turba_Object object.
\Turba_Driver | $driver | The source that this object came from. |
array | $attributes | Hash of attributes for this object. |
array | $options | Hash of options for this object. @since Turba 4.2 |
ensureAttributes()
Ensures we save attributes of a certain type to attributes of the same type but a different attribute name, if the original name didn't exist.
Needed to cover the case where a contact might have been imported via vCard with email/phone/etc TYPEs that do not match the configured attributes for this source. E.g., the vCard contains a TYPE=HOME but we only have the generic 'email' field available or vice versa.
lastModification() : integer
Returns the timestamp of the last modification, whether this was the creation or editing of the object and stores it as the attribute __modified. The value is cached for the lifetime of the object.
The timestamp of the last modification or zero.
merge(\Turba_Object $contact)
Merges another contact into this one by filling empty fields of this contact with values from the other.
\Turba_Object | $contact | Another contact. |