PHP 클래스 Horde_Kolab_Server_Objects_Base, horde

Copyright 2008-2016 Horde LLC (http://www.horde.org/) See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.
상속: implements Horde_Kolab_Server_Objects_Interface
파일 보기 프로젝트 열기: horde/horde

공개 메소드들

메소드 설명
add ( array $info ) : Kolab_Object Add a Kolab object.
fetch ( string $guid = null, string $type = null ) : Kolab_Object Fetch a Kolab object.
listHash ( string $type, array $params = null ) : array Generate a hash representation for a list of objects.
listObjects ( string $type, array $params = null ) : array List all objects of a specific type.
setComposite ( Horde_Kolab_Server_Composite $composite ) : null Set the composite server reference for this object.

메소드 상세

add() 공개 메소드

Add a Kolab object.
public add ( array $info ) : Kolab_Object
$info array The object to store.
리턴 Kolab_Object The newly created Kolab object.

fetch() 공개 메소드

This method will not retrieve any data from the server immediately. Instead it will simply generate a new instance for the desired object. The server data will only be accessed once you start reading the object data. This method can also be used in order to fetch non-existing objects that will be saved later. This is however not recommended and you should rather use the add($info) method for that. If you do not provide the object type the server will try to determine it automatically based on the uid. As this requires reading data from the server it is recommended to specify the object type whenever it is known. If you do not specify a uid the object corresponding to the user bound to the server will be returned.
public fetch ( string $guid = null, string $type = null ) : Kolab_Object
$guid string The GUID of the object to fetch.
$type string The type of the object to fetch.
리턴 Kolab_Object The corresponding Kolab object.

listHash() 공개 메소드

The approach taken here is somewhat slow as the server data gets fetched into objects first which are then converted to hashes again. Since a server search will usually deliver the result as a hash the intermediate object conversion is inefficient. But as the object classes are able to treat the attributes returned from the server with custom parsing, this is currently the preferred method. Especially for large result sets it would be better if this method would call a static object class function that operate on the result array returned from the server without using objects.
public listHash ( string $type, array $params = null ) : array
$type string The type of the objects to be listed
$params array Additional parameters.
리턴 array An array of Kolab objects.

listObjects() 공개 메소드

List all objects of a specific type.
public listObjects ( string $type, array $params = null ) : array
$type string The type of the objects to be listed
$params array Additional parameters.
리턴 array An array of Kolab objects.

setComposite() 공개 메소드

Set the composite server reference for this object.
public setComposite ( Horde_Kolab_Server_Composite $composite ) : null
$composite Horde_Kolab_Server_Composite A link to the composite server handler.
리턴 null