Class Turba_Object

Description

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

$Horde: turba/lib/Object.php,v 1.17.10.14 2010/08/14 19:20:40 jan Exp $

Located in /lib/Object.php (line 12)


	
			
Direct descendents
Class Description
 class Turba_Group The Turba_Group:: class provides a set of methods for dealing with contact groups.
 class Turba_Object_Group The Turba_Object_Group:: class provides a set of methods for dealing with contact groups.
Variable Summary
Method Summary
 Turba_Object Turba_Object ( &$driver, [array $attributes = array()], Turba_Driver $driver)
 void addFile (array $info)
 void deleteFile (string $file)
 void deleteFiles ()
 array getAttributes ()
 string getGuid ([string $delimiter = ':'])
 void getSource ()
 mixed getValue (string $attribute)
 boolean hasPermission (integer $perm)
 boolean hasValue (string $attribute)
 boolean isEditable ()
 boolean isGroup ()
 array listFiles ()
 void setValue (string $attribute, string $value)
 void store ()
 void url ([ $view = null], [ $full = false])
 string vfsDisplayUrl (string $file)
 string vfsEditUrl (string $file)
 void _vfsInit ()
Variables
array $attributes (line 26)

Hash of attributes for this contact.

Turba_Driver $driver (line 19)

Underlying driver.

array $sortValue = array() (line 40)

Keeps the normalized values of sort columns.

VFS $_vfs (line 33)

Reference to this object's VFS instance.

Methods
Constructor Turba_Object (line 48)

Constructs a new Turba_Object object.

Turba_Object Turba_Object ( &$driver, [array $attributes = array()], Turba_Driver $driver)
  • Turba_Driver $driver: The source that this object came from.
  • array $attributes: Hash of attributes for this object.
  • &$driver
addFile (line 260)

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

void addFile (array $info)
  • array $info: A hash with the file information as returned from a Horde_Form_Type_file.
deleteFile (line 290)

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

void deleteFile (string $file)
  • string $file: The file name.
deleteFiles (line 302)

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

void deleteFiles ()
getAttributes (line 60)

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

  • return: All properties of this object.
array getAttributes ()
getGuid (line 80)

Get a fully qualified key for this contact.

  • return: Fully qualified contact id.
string getGuid ([string $delimiter = ':'])
  • string $delimiter: Delimiter for the parts of the key, defaults to ':'.
getSource (line 68)

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

void getSource ()
getValue (line 93)

Returns the value of the specified attribute.

  • return: The value of $attribute, an array (for photo type) or the empty string.
mixed getValue (string $attribute)
  • string $attribute: The attribute to retrieve.
hasPermission (line 234)

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

  • return: True if user has the permission.
boolean hasPermission (integer $perm)
  • integer $perm: The permission to check.
hasValue (line 192)

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

  • return: Whether or not there is a value for $attribute.
boolean hasValue (string $attribute)
  • string $attribute: The attribute to check.
isEditable (line 222)

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

  • return: Whether or not the current user can edit this object
boolean isEditable ()
isGroup (line 212)

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

  • return: True if this object is a group of multiple contacts.
boolean isGroup ()

Redefined in descendants as:
listFiles (line 320)

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

  • return: A list of hashes with file informations.
array listFiles ()
setValue (line 148)

Sets the value of the specified attribute.

void setValue (string $attribute, string $value)
  • string $attribute: The attribute to set.
  • string $value: The value of $attribute.
store (line 409)

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

void store ()
url (line 242)

Contact url.

void url ([ $view = null], [ $full = false])
  • $view
  • $full

Redefined in descendants as:
vfsDisplayUrl (line 339)

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

  • return: The HTML code of the generated link.
string vfsDisplayUrl (string $file)
  • string $file: The file name.
vfsEditUrl (line 394)

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

  • return: The HTML code of the generated link.
string vfsEditUrl (string $file)
  • string $file: The file name.
_vfsInit (line 422)

Loads the VFS configuration and initializes the VFS backend.

void _vfsInit ()

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