Class Turba

Description

Turba Base Class.

Located in /lib/Turba.php (line 18)


	
			
Method Summary
 mixed &createShare (string $share_id, array $params)
 mixed doMaintenance ()
 void formatEmailAddresses ( $data,  $name)
 string formatName (Turba_Object $ob, [string $name_format = null])
 array getAddressBooks ([integer $permission = PERMS_READ], [array $options = array()])
 void getColumnName ( $i,  $columns)
 void getColumns ()
 array getConfigFromShares (array $sources)
 mixed getExtendedPermission (Turba_Driver $addressBook, string $permission)
 void getMenu ([ $returnType = 'object'])
 void getSourceFromShare (Horde_Share &$share)
 void getUserName ( $uid)
 string guessLastname (string $name)
 array listShares ([boolean $owneronly = false], [integer $permission = PERMS_READ])
 array permissionsFilter (array $in, [integer $permission = PERMS_READ], [array $options = array()], string $filter)
Methods
createShare (line 553)

Create a new Turba share.

  • return: The new share object or PEAR_Error
mixed &createShare (string $share_id, array $params)
  • string $share_id: The id for the new share.
  • array $params: Parameters for the new share.
doMaintenance (line 655)

Checks for any maintenance to run

  • return: True || PEAR_Error
mixed doMaintenance ()
formatEmailAddresses (line 20)
void formatEmailAddresses ( $data,  $name)
  • $data
  • $name
formatName (line 242)

Formats the name according to the user's preference.

  • return: The formatted name, either "Firstname Lastname" or "Lastname, Firstname" depending on $name_format or the user's preference.
string formatName (Turba_Object $ob, [string $name_format = null])
  • Turba_Object $ob: The object to get a name from.
  • string $name_format: The formatting. One of 'none', 'last_first' or 'first_last'.
getAddressBookOrder (line 120)

Get the order the user selected for displaying address books.

  • return: An array describing the order to display the address books.
array getAddressBookOrder ()
getAddressBooks (line 101)

Get all the address books the user has the requested permissions to and return them in the user's preferred order.

  • return: The filtered, ordered $cfgSources entries.
array getAddressBooks ([integer $permission = PERMS_READ], [array $options = array()])
  • integer $permission: The PERMS_* constant to filter on.
  • array $options: Any additional options.
getColumnName (line 174)

Retrieves a column's field name

void getColumnName ( $i,  $columns)
  • $i
  • $columns
getColumns (line 181)
void getColumns ()
getConfigFromShares (line 385)

Replaces all share-enabled sources in a source list with all shares from this source that the current user has access to.

This will only sync shares that are unique to Horde (basically, a SQL driver source for now). Any backend that supports ACLs or similar mechanism should be configured from within sources.php or _horde_hook_share_* calls.

  • return: The $cfgSources array.
array getConfigFromShares (array $sources)
  • array $sources: The default $cfgSources array.
getDefaultAddressBook (line 140)

Returns the current user's default address book.

  • return: The default address book name.
string getDefaultAddressBook ()
getExtendedPermission (line 317)

Gets extended permissions on an address book.

  • return: The requested extended permissions value, or true if it doesn't exist.
  • since: Turba 2.1
mixed getExtendedPermission (Turba_Driver $addressBook, string $permission)
  • Turba_Driver $addressBook: The address book to get extended permissions for.
  • string $permission: What extended permission to get.
getMenu (line 617)

Build Turba's list of menu items.

void getMenu ([ $returnType = 'object'])
  • $returnType
getPreferredSortOrder (line 166)

Returns the sort order selected by the user

void getPreferredSortOrder ()
getSourceFromShare (line 502)

Retrieve a new source config entry based on a Turba share.

  • since: Turba 2.2
void getSourceFromShare (Horde_Share &$share)
  • Horde_Share &$share: object The share to base config on.
getUserName (line 290)

Returns the real name, if available, of a user.

  • since: Turba 2.2
void getUserName ( $uid)
  • $uid
guessLastname (line 206)

Returns a best guess at the lastname in a string.

  • return: String containing the last name.
string guessLastname (string $name)
  • string $name: String contain the full name.
listShares (line 528)

Returns all shares the current user has specified permissions to.

  • return: Shares the user has the requested permissions to.
array listShares ([boolean $owneronly = false], [integer $permission = PERMS_READ])
  • boolean $owneronly: Only return address books owned by the user? Defaults to false.
  • integer $permission: Permissions to filter by.
permissionsFilter (line 350)

Filters data based on permissions.

  • return: The filtered data.
array permissionsFilter (array $in, [integer $permission = PERMS_READ], [array $options = array()], string $filter)
  • array $in: The data we want filtered.
  • string $filter: What type of data we are filtering.
  • integer $permission: The PERMS_* constant we will filter on.
  • array $options: Additional options.

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