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

Turba Base Class.

Package: Turba
Author: Chuck Hagenbuch chuck@horde.org
Author: Jon Parise jon@horde.org
Located at Turba.php
Methods summary
public static array
# availableSources( )

Returns the source entries from config/backends.php that have been configured as available sources in the main Turba configuration.

Returns the source entries from config/backends.php that have been configured as available sources in the main Turba configuration.

Returns

array
List of available sources.
public static array
# getAddressBooks( integer $permission = Horde_Perms::READ, array $options = array() )

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

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

Parameters

$permission
The Horde_Perms::* constant to filter on.
$options
Any additional options.

Returns

array
The filtered, ordered $cfgSources entries.
public static array
# getAddressBookOrder( )

Get the order the user selected for displaying address books.

Get the order the user selected for displaying address books.

Returns

array

An array describing the order to display the address books.

public static string
# getDefaultAddressbook( )

Returns the current user's default address book.

Returns the current user's default address book.

Returns

string
The default address book name.
public static
# getPreferredSortOrder( )

Returns the sort order selected by the user

Returns the sort order selected by the user

public static
# setPreferredSortOrder( Horde_Variables $vars, string $source )

Saves the sort order to the preferences backend.

Saves the sort order to the preferences backend.

Parameters

$vars
Variables object.
$source
Source.
public static string
# getColumnName( integer $i, array $columns )

Retrieves a column's field name.

Retrieves a column's field name.

Parameters

$i
TODO
$columns
TODO

Returns

string
TODO
public static
# getColumns( )
public static string
# formatCompositeField( string $format, array $fields )

Builds and cleans up a composite field.

Builds and cleans up a composite field.

Parameters

$format
The sprintf field format.
$fields
The fields that compose the composite field.

Returns

string
The formatted composite field.
public static string
# guessLastname( string $name )

Returns a best guess at the lastname in a string.

Returns a best guess at the lastname in a string.

Parameters

$name
String contain the full name.

Returns

string
String containing the last name.
public static string
# formatName( Turba_Object $ob, string $name_format = null )

Formats the name according to the user's preference.

Formats the name according to the user's preference.

If the format is 'none', the full name with all parts is returned. If the format is 'last_first' or 'first_last', only the first name and last name are returned.

Parameters

$ob
The object to get a name from.
$name_format
<p>The formatting. One of 'none', 'last_first' or 'first_last'. Defaults to the user preference.</p>

Returns

string

The formatted name, either "Firstname Lastname" or "Lastname, Firstname" depending on $name_format or the user's preference.

public static mixed
# formatEmailAddresses( mixed $data, string $name )

Parameters

$data
<p>Either a single email address or an array of email addresses to format.</p>
$name
The personal name phrase.

Returns

mixed

Either the formatted address or an array of formatted addresses.

public static string
# getUserName( string $uid )

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

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

Parameters

$uid
The uid of the name to return.

Returns

string
The user's full, real name.
public static mixed
# getExtendedPermission( Turba_Driver $addressBook, string $permission )

Gets extended permissions on an address book.

Gets extended permissions on an address book.

Parameters

$addressBook
<p>The address book to get extended permissions for.</p>
$permission
What extended permission to get.

Returns

mixed

The requested extended permissions value, or true if it doesn't exist.

public static array
# permissionsFilter( array $in, string $permission = Horde_Perms::READ, array $options = array() )

Filters data based on permissions.

Filters data based on permissions.

Parameters

$in
The data we want filtered.
$permission
$filter What type of data we are filtering.
$options
<p>$permission The Horde_Perms::* constant we will filter on.</p>

Returns

array
The filtered data.
public static array
# getConfigFromShares( array $sources )

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

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 (such as a SQL source). Any backend that supports ACLs or similar mechanism should be configured from within backends.php or via Horde's share_* hooks.

Parameters

$sources
The default $cfgSources array.

Returns

array
The $cfgSources array.
public static array
# getSourceFromShare( Horde_Share $share )

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

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

Parameters

$share
The share to base config on.

Returns

array
The $cfgSource entry for this share source.
public static array
# listShares( boolean $owneronly = false, integer $permission = Horde_Perms::READ )

Returns all shares the current user has specified permissions to.

Returns all shares the current user has specified permissions to.

Parameters

$owneronly
<p>Only return address books owned by the user? Defaults to false.</p>
$permission
Permissions to filter by.

Returns

array
Shares the user has the requested permissions to.
public static Horde_Share
# createShare( string $share_name, array $params )

Create a new Turba share.

Create a new Turba share.

Parameters

$share_name
The id for the new share.
$params
Parameters for the new share.

Returns

Horde_Share
The new share object.

Throws

Turba_Exception
public static
# addBrowseJs( )

Add browse.js javascript to page.

Add browse.js javascript to page.

Constants summary
string VFS_PATH

The virtual path to use for VFS data.

The virtual path to use for VFS data.

# '.horde/turba/documents'
API documentation generated by ApiGen