PHP 클래스 Turba_Object_Group, horde

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

공개 메소드들

메소드 설명
__construct ( Turba_Driver $driver, array $attributes = [], array $options = [] ) Constructs a new Turba_Object_Group.
addMember ( string $contactId, string $sourceId = null ) Adds a new contact entry to this group.
count ( ) : integer Count the number of contacts in this group.
createGroup ( string $source, array $members, array $opts = [] ) : object Add members to a group, creating the group if necessary.
isGroup ( ) : boolean Returns true if this object is a group of multiple contacts.
listMembers ( array $sort = null ) : Turba_List Retrieve the Objects in this group
removeMember ( string $contactId, string $sourceId = null ) Deletes a contact from this group.
url ( $view = null, $full = false ) : Horde_Url Contact url.

보호된 메소드들

메소드 설명
_ensureEmail ( )

메소드 상세

__construct() 공개 메소드

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

_ensureEmail() 보호된 메소드

protected _ensureEmail ( )

addMember() 공개 메소드

Adds a new contact entry to this group.
public addMember ( string $contactId, string $sourceId = null )
$contactId string The id of the contact to add.
$sourceId string The source $contactId is from.

count() 공개 메소드

Count the number of contacts in this group.
public count ( ) : integer
리턴 integer

createGroup() 공개 정적인 메소드

Add members to a group, creating the group if necessary.
public static createGroup ( string $source, array $members, array $opts = [] ) : object
$source string Destination source.
$members array Members of the group. Array of two-element arrays: source and key.
$opts array Additional options:
 - attr: (array) Array of attributes to use to create a new group.
         This should include 'name' at a minimum.
 - gid: (string) Existing Group ID.
 - name: (string) Group Name.
리턴 object Object with the following properties:
  - errors: (array) List of errors when adding members.
  - group: (Turba_Object_Group) Group object.
  - success: (integer) Number of members sucessfully added.

isGroup() 공개 메소드

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

listMembers() 공개 메소드

Retrieve the Objects in this group
public listMembers ( array $sort = null ) : Turba_List
$sort array The requested sort order which is passed to Turba_List::sort().
리턴 Turba_List List containing the members of this group

removeMember() 공개 메소드

Deletes a contact from this group.
public removeMember ( string $contactId, string $sourceId = null )
$contactId string The id of the contact to remove.
$sourceId string The source $contactId is from.

url() 공개 메소드

Contact url.
public url ( $view = null, $full = false ) : Horde_Url
리턴 Horde_Url