PHP 클래스 Turba_Object, horde

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

공개 프로퍼티들

프로퍼티 타입 설명
$attributes array Hash of attributes for this contact.
$driver Turba_Driver Underlying driver.
$sortValue array Keeps the normalized values of sort columns.

보호된 프로퍼티들

프로퍼티 타입 설명
$_emailFields array A hash with turba attribute names as key.
$_options boolean Any additional options.
$_vfs VFS Reference to this object's VFS instance.

공개 메소드들

메소드 설명
__construct ( Turba_Driver $driver, array $attributes = [], array $options = [] ) Constructs a new Turba_Object object.
addFile ( array $info ) Saves a file into the VFS backend associated with this object.
deleteFile ( string $file ) Deletes a file from the VFS backend associated with this object.
deleteFiles ( ) Deletes all files from the VFS backend associated with this object.
getAttributes ( ) : array Returns a key-value hash containing all properties of this object.
getGuid ( string $delimiter = ':' ) : string Get a fully qualified key for this contact.
getHistory ( ) : array Returns history information about this contact.
getSource ( ) Returns the name of the address book that this object is from.
getValue ( string $attribute ) : mixed Returns the value of the specified attribute.
hasPermission ( integer $perm ) : boolean Returns whether or not the current user has the requested permission.
hasValue ( string $attribute ) : boolean Determines whether or not the object has a value for the specified attribute.
isEditable ( ) : boolean Returns true if this object is editable by the current user.
isGroup ( ) : boolean Returns true if this object is a group of multiple contacts.
lastModification ( ) : integer 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.
listFiles ( ) : array Returns all files from the VFS backend associated with this object.
merge ( Turba_Object $contact ) Merges another contact into this one by filling empty fields of this contact with values from the other.
setValue ( string $attribute, string $value ) Sets the value of the specified attribute.
store ( ) Saves the current state of the object to the storage backend.
synchronizeTags ( array $tags ) Syncronizes tags from the tagging backend with the contacts storage backend, if necessary.
url ( string $view = null, boolean $full = false ) : string Contact url.
vfsDisplayUrl ( string $file ) : string Returns a link to display and download a file from the VFS backend associated with this object.
vfsEditUrl ( string $file ) : string Returns a link to display, download, and delete a file from the VFS backend associated with this object.
vfsInit ( ) : Horde_Vfs Loads the VFS configuration and initializes the VFS backend.

보호된 메소드들

메소드 설명
_ensureEmail ( ) Ensures we have an email address set, if available.

메소드 상세

__construct() 공개 메소드

Constructs a new Turba_Object object.
public __construct ( Turba_Driver $driver, array $attributes = [], array $options = [] )
$driver Turba_Driver The source that this object came from.
$attributes array Hash of attributes for this object.
$options array Hash of options for this object. @since Turba 4.2

_ensureEmail() 보호된 메소드

Needed to cover the case where a contact might have been imported via vCard with email TYPEs that do not match the configured attributes for this source. E.g., the vCard contains a TYPE=HOME but we only have the generic 'email' field available.
protected _ensureEmail ( )

addFile() 공개 메소드

Saves a file into the VFS backend associated with this object.
public addFile ( array $info )
$info array A hash with the file information as returned from a Horde_Form_Type_file.

deleteFile() 공개 메소드

Deletes a file from the VFS backend associated with this object.
public deleteFile ( string $file )
$file string The file name.

deleteFiles() 공개 메소드

Deletes all files from the VFS backend associated with this object.
public deleteFiles ( )

getAttributes() 공개 메소드

Returns a key-value hash containing all properties of this object.
public getAttributes ( ) : array
리턴 array All properties of this object.

getGuid() 공개 메소드

Get a fully qualified key for this contact.
public getGuid ( string $delimiter = ':' ) : string
$delimiter string Delimiter for the parts of the key, defaults to ':'.
리턴 string Fully qualified contact id.

getHistory() 공개 메소드

Returns history information about this contact.
public getHistory ( ) : array
리턴 array A hash with the optional entries 'created' and 'modified' and human readable history information as the values.

getSource() 공개 메소드

Returns the name of the address book that this object is from.
public getSource ( )

getValue() 공개 메소드

Returns the value of the specified attribute.
public getValue ( string $attribute ) : mixed
$attribute string The attribute to retrieve.
리턴 mixed The value of $attribute, an array (for photo type) or the empty string.

hasPermission() 공개 메소드

Returns whether or not the current user has the requested permission.
public hasPermission ( integer $perm ) : boolean
$perm integer The permission to check.
리턴 boolean True if user has the permission.

hasValue() 공개 메소드

Determines whether or not the object has a value for the specified attribute.
public hasValue ( string $attribute ) : boolean
$attribute string The attribute to check.
리턴 boolean Whether or not there is a value for $attribute.

isEditable() 공개 메소드

Returns true if this object is editable by the current user.
public isEditable ( ) : boolean
리턴 boolean Whether or not the current user can edit this object

isGroup() 공개 메소드

Returns true if this object is a group of multiple contacts.
public isGroup ( ) : boolean
리턴 boolean True if this object is a group of multiple contacts.

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.
public lastModification ( ) : integer
리턴 integer The timestamp of the last modification or zero.

listFiles() 공개 메소드

Returns all files from the VFS backend associated with this object.
public listFiles ( ) : array
리턴 array A list of hashes with file informations.

merge() 공개 메소드

Merges another contact into this one by filling empty fields of this contact with values from the other.
public merge ( Turba_Object $contact )
$contact Turba_Object Another contact.

setValue() 공개 메소드

Sets the value of the specified attribute.
public setValue ( string $attribute, string $value )
$attribute string The attribute to set.
$value string The value of $attribute.

store() 공개 메소드

Saves the current state of the object to the storage backend.
public store ( )

synchronizeTags() 공개 메소드

Syncronizes tags from the tagging backend with the contacts storage backend, if necessary.
public synchronizeTags ( array $tags )
$tags array Tags from the tagging backend.

url() 공개 메소드

Contact url.
public url ( string $view = null, boolean $full = false ) : string
$view string The view for the url
$full boolean Generate a full url?
리턴 string

vfsDisplayUrl() 공개 메소드

Returns a link to display and download a file from the VFS backend associated with this object.
public vfsDisplayUrl ( string $file ) : string
$file string The file name.
리턴 string The HTML code of the generated link.

vfsEditUrl() 공개 메소드

Returns a link to display, download, and delete a file from the VFS backend associated with this object.
public vfsEditUrl ( string $file ) : string
$file string The file name.
리턴 string The HTML code of the generated link.

vfsInit() 공개 메소드

Loads the VFS configuration and initializes the VFS backend.
public vfsInit ( ) : Horde_Vfs
리턴 Horde_Vfs A VFS object.

프로퍼티 상세

$_emailFields 보호되어 있는 프로퍼티

A hash with turba attribute names as key.
protected array $_emailFields
리턴 array

$_options 보호되어 있는 프로퍼티

Any additional options.
protected bool $_options
리턴 boolean

$_vfs 보호되어 있는 프로퍼티

Reference to this object's VFS instance.
protected VFS $_vfs
리턴 VFS

$attributes 공개적으로 프로퍼티

Hash of attributes for this contact.
public array $attributes
리턴 array

$driver 공개적으로 프로퍼티

Underlying driver.
public Turba_Driver $driver
리턴 Turba_Driver

$sortValue 공개적으로 프로퍼티

Keeps the normalized values of sort columns.
public array $sortValue
리턴 array