PHP 클래스 Turba, horde

저자: Chuck Hagenbuch ([email protected])
저자: Jon Parise ([email protected])
파일 보기 프로젝트 열기: horde/horde 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$source string The current source.

보호된 프로퍼티들

프로퍼티 타입 설명
$_cache array Cached data.

공개 메소드들

메소드 설명
addBrowseJs ( ) Add browse.js javascript to page.
availableSources ( ) : array Returns the source entries from config/backends.php that have been configured as available sources in the main Turba configuration.
createShare ( string $share_name, array $params ) : Horde_Share Create a new Turba share.
formatCompositeField ( string $format, array $fields ) : string Builds and cleans up a composite field.
formatEmailAddresses ( mixed $data, string $name ) : mixed TODO
formatName ( Turba_Object $ob, string $name_format = null ) : string Formats the name according to the user's preference.
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.
getAvailableEmailFields ( $source = null, $searchable = true ) : array Return an array of all available attributes of type 'email'. Optionally, ensure the field is defined in the specified $source.
getColumnName ( integer $i, array $columns ) : string Retrieves a column's field name.
getColumns ( ) TODO
getConfigFromShares ( array $sources, boolean $owner = false ) : array Replaces all share-enabled sources in a source list with all shares from this source that the current user has access to.
getDefaultAddressbook ( ) : string Returns the current user's default address book.
getExtendedPermission ( Turba_Driver $addressBook, string $permission ) : mixed Gets extended permissions on an address book.
getPreferredSortOrder ( ) : array Returns the sort order selected by the user.
getSourceFromShare ( Horde_Share_Object $share ) : array Retrieve a new source config entry based on a Turba share.
getUserName ( string $uid ) : string Returns the real name, if available, of a user.
guessLastname ( string $name ) : string Returns a best guess at the lastname in a string.
hasMaxContacts ( Turba_Driver $driver, boolean $notify = true ) : string Checks the max_contacts permission.
listShares ( boolean $owneronly = false, integer $permission = Horde_Perms::READ ) : array Returns all shares the current user has specified permissions to.
permissionsFilter ( array $in, integer $permission = Horde_Perms::READ, array $options = [] ) : array Filters sources based on permissions.
setPreferredSortOrder ( Horde_Variables $vars, string $source ) Saves the sort order to the preferences backend.

메소드 상세

addBrowseJs() 공개 정적인 메소드

Add browse.js javascript to page.
public static addBrowseJs ( )

availableSources() 공개 정적인 메소드

Returns the source entries from config/backends.php that have been configured as available sources in the main Turba configuration.
public static availableSources ( ) : array
리턴 array List of available sources.

createShare() 공개 정적인 메소드

Create a new Turba share.
public static createShare ( string $share_name, array $params ) : Horde_Share
$share_name string The id for the new share.
$params array Parameters for the new share.
리턴 Horde_Share The new share object.

formatCompositeField() 공개 정적인 메소드

Builds and cleans up a composite field.
public static formatCompositeField ( string $format, array $fields ) : string
$format string The sprintf field format.
$fields array The fields that compose the composite field.
리턴 string The formatted composite field.

formatEmailAddresses() 공개 정적인 메소드

TODO
public static formatEmailAddresses ( mixed $data, string $name ) : mixed
$data mixed Either a single email address or an array of email addresses to format.
$name string The personal name phrase.
리턴 mixed Either the formatted address or an array of formatted addresses.

formatName() 공개 정적인 메소드

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.
public static formatName ( Turba_Object $ob, string $name_format = null ) : string
$ob Turba_Object The object to get a name from.
$name_format string The formatting. One of 'none', 'last_first' or 'first_last'. Defaults to the user preference.
리턴 string The formatted name, either "Firstname Lastname" or "Lastname, Firstname" depending on $name_format or the user's preference.

getAddressBooks() 공개 정적인 메소드

Get all the address books the user has the requested permissions to and return them in the user's preferred order.
public static getAddressBooks ( integer $permission = Horde_Perms::READ, array $options = [] ) : array
$permission integer The Horde_Perms::* constant to filter on.
$options array Any additional options.
리턴 array The filtered, ordered $cfgSources entries.

getAvailableEmailFields() 공개 정적인 메소드

Return an array of all available attributes of type 'email'. Optionally, ensure the field is defined in the specified $source.
부터: 4.2.9
public static getAvailableEmailFields ( $source = null, $searchable = true ) : array
$source string An optional source identifier.
$searchable boolean If true, and $source is provided, ensure that the email field is a configured searchable field.
리턴 array An array of email fields.

getColumnName() 공개 정적인 메소드

Retrieves a column's field name.
public static getColumnName ( integer $i, array $columns ) : string
$i integer TODO
$columns array TODO
리턴 string TODO

getColumns() 공개 정적인 메소드

TODO
public static getColumns ( )

getConfigFromShares() 공개 정적인 메소드

This will only sync shares that are unique to Horde (such as a SQL or Kolab sources). Any backend that supports ACLs or similar mechanism should be configured from within backends.local.php or via Horde's share_* hooks.
public static getConfigFromShares ( array $sources, boolean $owner = false ) : array
$sources array The default $cfgSources array.
$owner boolean Only return shares that the current user owns?
리턴 array The $cfgSources array.

getDefaultAddressbook() 공개 정적인 메소드

Returns the current user's default address book.
public static getDefaultAddressbook ( ) : string
리턴 string The default address book name.

getExtendedPermission() 공개 정적인 메소드

Gets extended permissions on an address book.
public static getExtendedPermission ( Turba_Driver $addressBook, string $permission ) : mixed
$addressBook Turba_Driver The address book to get extended permissions for.
$permission string What extended permission to get.
리턴 mixed The requested extended permissions value, or true if it doesn't exist.

getPreferredSortOrder() 공개 정적인 메소드

Returns the sort order selected by the user.
public static getPreferredSortOrder ( ) : array
리턴 array TODO

getSourceFromShare() 공개 정적인 메소드

Retrieve a new source config entry based on a Turba share.
public static getSourceFromShare ( Horde_Share_Object $share ) : array
$share Horde_Share_Object
리턴 array The $cfgSource entry for this share source.

getUserName() 공개 정적인 메소드

Returns the real name, if available, of a user.
public static getUserName ( string $uid ) : string
$uid string The uid of the name to return.
리턴 string The user's full, real name.

guessLastname() 공개 정적인 메소드

Returns a best guess at the lastname in a string.
public static guessLastname ( string $name ) : string
$name string String contain the full name.
리턴 string String containing the last name.

hasMaxContacts() 공개 정적인 메소드

Checks the max_contacts permission.
public static hasMaxContacts ( Turba_Driver $driver, boolean $notify = true ) : string
$driver Turba_Driver The address book to check.
$notify boolean If true, outputs error to notification.
리턴 string Error message if maximum contacts have been reached. False otherwise.

listShares() 공개 정적인 메소드

Returns all shares the current user has specified permissions to.
public static listShares ( boolean $owneronly = false, integer $permission = Horde_Perms::READ ) : array
$owneronly boolean Only return address books owned by the user? Defaults to false.
$permission integer Permissions to filter by.
리턴 array Shares the user has the requested permissions to.

permissionsFilter() 공개 정적인 메소드

Filters sources based on permissions.
public static permissionsFilter ( array $in, integer $permission = Horde_Perms::READ, array $options = [] ) : array
$in array The source list we want filtered.
$permission integer The Horde_Perms::* constant we will filter on.
$options array Additional options: - require_add: (boolean) Only return sources that can be added to.
리턴 array The filtered data.

setPreferredSortOrder() 공개 정적인 메소드

Saves the sort order to the preferences backend.
public static setPreferredSortOrder ( Horde_Variables $vars, string $source )
$vars Horde_Variables Variables object.
$source string Source.

프로퍼티 상세

$_cache 보호되어 있는 정적으로 프로퍼티

Cached data.
protected static array $_cache
리턴 array

$source 공개적으로 정적으로 프로퍼티

The current source.
public static string $source
리턴 string