Overview

Packages

  • Horde
    • Data
  • None
  • Turba

Classes

  • Turba
  • Turba_Api
  • Turba_Driver
  • Turba_Driver_Facebook
  • Turba_Driver_Favourites
  • Turba_Driver_Group
  • Turba_Driver_Imsp
  • Turba_Driver_Kolab
  • Turba_Driver_Ldap
  • Turba_Driver_Prefs
  • Turba_Driver_Share
  • Turba_Driver_Sql
  • Turba_Driver_Vbook
  • Turba_Exception
  • Turba_Factory_Driver
  • Turba_Form_AddContact
  • Turba_Form_Contact
  • Turba_Form_ContactBase
  • Turba_Form_CreateAddressBook
  • Turba_Form_DeleteAddressBook
  • Turba_Form_EditAddressBook
  • Turba_Form_EditContact
  • Turba_Form_EditContactGroup
  • Turba_List
  • Turba_LoginTasks_SystemTask_Upgrade
  • Turba_Object
  • Turba_Object_Group
  • Turba_Test
  • Turba_View_Browse
  • Turba_View_Contact
  • Turba_View_DeleteContact
  • Turba_View_Duplicates
  • Turba_View_EditContact
  • Turba_View_List
  • Overview
  • Package
  • Class
  • Tree

Class Turba_Object

The Turba_Object:: class provides a base implementation for Turba objects - people, groups, restaurants, etc.

Direct known subclasses

Turba_Object_Group
Package: Turba
Author: Chuck Hagenbuch chuck@horde.org
Author: Jon Parise jon@csh.rit.edu
Located at Object.php
Methods summary
public
# __construct( Turba_Driver $driver, array $attributes = array() )

Constructs a new Turba_Object object.

Constructs a new Turba_Object object.

Parameters

$driver
The source that this object came from.
$attributes
Hash of attributes for this object.
public array
# getAttributes( )

Returns a key-value hash containing all properties of this object.

Returns a key-value hash containing all properties of this object.

Returns

array
All properties of this object.
public
# getSource( )

Returns the name of the address book that this object is from.

Returns the name of the address book that this object is from.

public string
# getGuid( string $delimiter = ':' )

Get a fully qualified key for this contact.

Get a fully qualified key for this contact.

Parameters

$delimiter
Delimiter for the parts of the key, defaults to ':'.

Returns

string
Fully qualified contact id.
public mixed
# getValue( string $attribute )

Returns the value of the specified attribute.

Returns the value of the specified attribute.

Parameters

$attribute
The attribute to retrieve.

Returns

mixed

The value of $attribute, an array (for photo type) or the empty string.

public
# setValue( string $attribute, string $value )

Sets the value of the specified attribute.

Sets the value of the specified attribute.

Parameters

$attribute
The attribute to set.
$value
The value of $attribute.
public boolean
# hasValue( string $attribute )

Determines whether or not the object has a value for the specified attribute.

Determines whether or not the object has a value for the specified attribute.

Parameters

$attribute
The attribute to check.

Returns

boolean
Whether or not there is a value for $attribute.
public integer
# lastModification( )

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.

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.

Returns

integer
The timestamp of the last modification or zero.
public
# merge( Turba_Object $contact )

Merges another contact into this one by filling empty fields of this contact with values from the other.

Merges another contact into this one by filling empty fields of this contact with values from the other.

Parameters

$contact
Another contact.
public array
# getHistory( )

Returns history information about this contact.

Returns history information about this contact.

Returns

array

A hash with the optional entries 'created' and 'modified' and human readable history information as the values.

public boolean
# isGroup( )

Returns true if this object is a group of multiple contacts.

Returns true if this object is a group of multiple contacts.

Returns

boolean
True if this object is a group of multiple contacts.
public boolean
# isEditable( )

Returns true if this object is editable by the current user.

Returns true if this object is editable by the current user.

Returns

boolean
Whether or not the current user can edit this object
public boolean
# hasPermission( integer $perm )

Returns whether or not the current user has the requested permission.

Returns whether or not the current user has the requested permission.

Parameters

$perm
The permission to check.

Returns

boolean
True if user has the permission.
public string
# url( string $view = null, boolean $full = false )

Contact url.

Contact url.

Parameters

$view
The view for the url
$full
Generate a full url?

Returns

string
public
# addFile( array $info )

Saves a file into the VFS backend associated with this object.

Saves a file into the VFS backend associated with this object.

Parameters

$info
<p>A hash with the file information as returned from a Horde_Form_Type_file.</p>

Throws

Turba_Exception
public
# deleteFile( string $file )

Deletes a file from the VFS backend associated with this object.

Deletes a file from the VFS backend associated with this object.

Parameters

$file
The file name.

Throws

Turba_Exception
public
# deleteFiles( )

Deletes all files from the VFS backend associated with this object.

Deletes all files from the VFS backend associated with this object.

Throws

Turba_Exception
public array
# listFiles( )

Returns all files from the VFS backend associated with this object.

Returns all files from the VFS backend associated with this object.

Returns

array
A list of hashes with file informations.
public string
# vfsDisplayUrl( string $file )

Returns a link to display and download a file from the VFS backend associated with this object.

Returns a link to display and download a file from the VFS backend associated with this object.

Parameters

$file
The file name.

Returns

string
The HTML code of the generated link.
public string
# vfsEditUrl( string $file )

Returns a link to display, download, and delete a file from the VFS backend associated with this object.

Returns a link to display, download, and delete a file from the VFS backend associated with this object.

Parameters

$file
The file name.

Returns

string
The HTML code of the generated link.
public
# store( )

Saves the current state of the object to the storage backend.

Saves the current state of the object to the storage backend.

Throws

Turba_Exception
Properties summary
public Turba_Driver $driver

Underlying driver.

Underlying driver.

#
public array $attributes

Hash of attributes for this contact.

Hash of attributes for this contact.

#
public array $sortValue

Keeps the normalized values of sort columns.

Keeps the normalized values of sort columns.

# array()
API documentation generated by ApiGen