[ Index ]

PHP Cross Reference of vtigercrm-6.1.0

title

Body

[close]

/include/Zend/Gdata/ -> Gapps.php (summary)

Zend Framework LICENSE

Copyright: Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
License: http://framework.zend.com/license/new-bsd New BSD License
Version: $Id: Gapps.php 24593 2012-01-05 20:35:02Z matthew $
File Size: 1683 lines (62 kb)
Included or required: 8 times
Referenced: 0 times
Includes or requires: 13 files
 include/Zend/Gdata/App/IOException.php
 include/Zend/Gdata/App/InvalidArgumentException.php
 include/Zend/Gdata/Gapps/MemberFeed.php
 include/Zend/Gdata/App/Exception.php
 include/Zend/Gdata/Gapps/NicknameFeed.php
 include/Zend/Gdata/Gapps/ServiceException.php
 include/Zend/Gdata/Gapps/OwnerFeed.php
 include/Zend/Gdata/Gapps/EmailListFeed.php
 include/Zend/Gdata.php
 include/Zend/Loader.php
 include/Zend/Gdata/Gapps/GroupFeed.php
 include/Zend/Gdata/Gapps/UserFeed.php
 include/Zend/Gdata/Gapps/EmailListRecipientFeed.php

Defines 1 class

Zend_Gdata_Gapps:: (71 methods):
  __construct()
  throwServiceExceptionIfDetected()
  import()
  get()
  post()
  put()
  delete()
  setDomain()
  getDomain()
  getBaseUrl()
  getUserFeed()
  getNicknameFeed()
  getGroupFeed()
  getMemberFeed()
  getOwnerFeed()
  getEmailListFeed()
  getEmailListRecipientFeed()
  getUserEntry()
  getNicknameEntry()
  getGroupEntry()
  getMemberEntry()
  getOwnerEntry()
  getEmailListEntry()
  getEmailListRecipientEntry()
  insertUser()
  insertNickname()
  insertGroup()
  insertMember()
  insertOwner()
  insertEmailList()
  insertEmailListRecipient()
  __call()
  createUser()
  retrieveUser()
  retrievePageOfUsers()
  retrieveAllUsers()
  updateUser()
  suspendUser()
  restoreUser()
  deleteUser()
  createNickname()
  retrieveNickname()
  retrieveNicknames()
  retrievePageOfNicknames()
  retrieveAllNicknames()
  deleteNickname()
  createGroup()
  retrieveGroup()
  retrieveAllGroups()
  deleteGroup()
  isMember()
  addMemberToGroup()
  removeMemberFromGroup()
  retrieveAllMembers()
  addOwnerToGroup()
  retrieveGroupOwners()
  isOwner()
  removeOwnerFromGroup()
  updateGroup()
  retrieveGroups()
  retrievePageOfGroups()
  retrievePageOfMembers()
  createEmailList()
  retrieveEmailLists()
  retrievePageOfEmailLists()
  retrieveAllEmailLists()
  deleteEmailList()
  addRecipientToEmailList()
  retrievePageOfRecipients()
  retrieveAllRecipients()
  removeRecipientFromEmailList()


Class: Zend_Gdata_Gapps  - X-Ref

Service class for interacting with the Google Apps Provisioning API.

Like other service classes in this module, this class provides access via
an HTTP client to Google servers for working with entries and feeds.

Because of the nature of this API, all access must occur over an
authenticated connection.

__construct($client = null, $domain = null, $applicationId = 'MyCompany-MyApp-1.0')   X-Ref
Create Gdata_Gapps object

param: Zend_Http_Client $client (optional) The HTTP client to use when
param: string $domain (optional) The Google Apps domain which is to be
param: string $applicationId The identity of the app in the form of Company-AppName-Version

throwServiceExceptionIfDetected($e)   X-Ref
Convert an exception to an ServiceException if an AppsForYourDomain
XML document is contained within the original exception's HTTP
response. If conversion fails, throw the original error.

param: Zend_Gdata_Exception $e The exception to convert.

import($uri, $client = null, $className='Zend_Gdata_App_Feed')   X-Ref
Imports a feed located at $uri.
This method overrides the default behavior of Zend_Gdata_App,
providing support for Zend_Gdata_Gapps_ServiceException.

param: string $uri
param: Zend_Http_Client $client (optional) The client used for
param: string $className (optional) The class which is used as the
return: Zend_Gdata_App_Feed

get($uri, $extraHeaders = array()   X-Ref
GET a URI using client object.
This method overrides the default behavior of Zend_Gdata_App,
providing support for Zend_Gdata_Gapps_ServiceException.

param: string $uri GET URI
param: array $extraHeaders Extra headers to add to the request, as an
return: Zend_Http_Response

post($data, $uri = null, $remainingRedirects = null,$contentType = null, $extraHeaders = null)   X-Ref
POST data with client object.
This method overrides the default behavior of Zend_Gdata_App,
providing support for Zend_Gdata_Gapps_ServiceException.

param: mixed $data The Zend_Gdata_App_Entry or XML to post
param: string $uri (optional) POST URI
param: integer $remainingRedirects (optional)
param: string $contentType Content-type of the data
param: array $extraHaders Extra headers to add tot he request
return: Zend_Http_Response

put($data, $uri = null, $remainingRedirects = null,$contentType = null, $extraHeaders = null)   X-Ref
PUT data with client object
This method overrides the default behavior of Zend_Gdata_App,
providing support for Zend_Gdata_Gapps_ServiceException.

param: mixed $data The Zend_Gdata_App_Entry or XML to post
param: string $uri (optional) PUT URI
param: integer $remainingRedirects (optional)
param: string $contentType Content-type of the data
param: array $extraHaders Extra headers to add tot he request
return: Zend_Http_Response

delete($data, $remainingRedirects = null)   X-Ref
DELETE entry with client object
This method overrides the default behavior of Zend_Gdata_App,
providing support for Zend_Gdata_Gapps_ServiceException.

param: mixed $data The Zend_Gdata_App_Entry or URL to delete
param: integer $remainingRedirects (optional)
return: void

setDomain($value)   X-Ref
Set domain for this service instance. This should be a fully qualified
domain, such as 'foo.example.com'.

This value is used when calculating URLs for retrieving and posting
entries. If no value is specified, a URL will have to be manually
constructed prior to using any methods which interact with the Google
Apps provisioning service.

param: string $value The domain to be used for this session.

getDomain()   X-Ref
Get domain for this service instance. This should be a fully qualified
domain, such as 'foo.example.com'. If no domain is set, null will be
returned.

return: string The domain to be used for this session, or null if not

getBaseUrl($domain = null)   X-Ref
Returns the base URL used to access the Google Apps service, based
on the current domain. The current domain can be temporarily
overridden by providing a fully qualified domain as $domain.

param: string $domain (optional) A fully-qualified domain to use

getUserFeed($location = null)   X-Ref
Retrieve a UserFeed containing multiple UserEntry objects.

param: mixed $location (optional) The location for the feed, as a URL
return: Zend_Gdata_Gapps_UserFeed

getNicknameFeed($location = null)   X-Ref
Retreive NicknameFeed object containing multiple NicknameEntry objects.

param: mixed $location (optional) The location for the feed, as a URL
return: Zend_Gdata_Gapps_NicknameFeed

getGroupFeed($location = null)   X-Ref
Retreive GroupFeed object containing multiple GroupEntry
objects.

param: mixed $location (optional) The location for the feed, as a URL
return: Zend_Gdata_Gapps_GroupFeed

getMemberFeed($location = null)   X-Ref
Retreive MemberFeed object containing multiple MemberEntry
objects.

param: mixed $location (optional) The location for the feed, as a URL
return: Zend_Gdata_Gapps_MemberFeed

getOwnerFeed($location = null)   X-Ref
Retreive OwnerFeed object containing multiple OwnerEntry
objects.

param: mixed $location (optional) The location for the feed, as a URL
return: Zend_Gdata_Gapps_OwnerFeed

getEmailListFeed($location = null)   X-Ref
Retreive EmailListFeed object containing multiple EmailListEntry
objects.

param: mixed $location (optional) The location for the feed, as a URL
return: Zend_Gdata_Gapps_EmailListFeed

getEmailListRecipientFeed($location)   X-Ref
Retreive EmailListRecipientFeed object containing multiple
EmailListRecipientEntry objects.

param: mixed $location The location for the feed, as a URL or Query.
return: Zend_Gdata_Gapps_EmailListRecipientFeed

getUserEntry($location)   X-Ref
Retreive a single UserEntry object.

param: mixed $location The location for the feed, as a URL or Query.
return: Zend_Gdata_Gapps_UserEntry

getNicknameEntry($location)   X-Ref
Retreive a single NicknameEntry object.

param: mixed $location The location for the feed, as a URL or Query.
return: Zend_Gdata_Gapps_NicknameEntry

getGroupEntry($location = null)   X-Ref
Retreive a single GroupEntry object.

param: mixed $location The location for the feed, as a URL or Query.
return: Zend_Gdata_Gapps_GroupEntry

getMemberEntry($location = null)   X-Ref
Retreive a single MemberEntry object.

param: mixed $location The location for the feed, as a URL or Query.
return: Zend_Gdata_Gapps_MemberEntry

getOwnerEntry($location = null)   X-Ref
Retreive a single OwnerEntry object.

param: mixed $location The location for the feed, as a URL or Query.
return: Zend_Gdata_Gapps_OwnerEntry

getEmailListEntry($location)   X-Ref
Retreive a single EmailListEntry object.

param: mixed $location The location for the feed, as a URL or Query.
return: Zend_Gdata_Gapps_EmailListEntry

getEmailListRecipientEntry($location)   X-Ref
Retreive a single EmailListRecipientEntry object.

param: mixed $location The location for the feed, as a URL or Query.
return: Zend_Gdata_Gapps_EmailListRecipientEntry

insertUser($user, $uri = null)   X-Ref
Create a new user from a UserEntry.

param: Zend_Gdata_Gapps_UserEntry $user The user entry to insert.
param: string $uri (optional) The URI where the user should be
return: Zend_Gdata_Gapps_UserEntry The inserted user entry as

insertNickname($nickname, $uri = null)   X-Ref
Create a new nickname from a NicknameEntry.

param: Zend_Gdata_Gapps_NicknameEntry $nickname The nickname entry to
param: string $uri (optional) The URI where the nickname should be
return: Zend_Gdata_Gapps_NicknameEntry The inserted nickname entry as

insertGroup($group, $uri = null)   X-Ref
Create a new group from a GroupEntry.

param: Zend_Gdata_Gapps_GroupEntry $group The group entry to insert.
param: string $uri (optional) The URI where the group should be
return: Zend_Gdata_Gapps_GroupEntry The inserted group entry as

insertMember($member, $uri = null)   X-Ref
Create a new member from a MemberEntry.

param: Zend_Gdata_Gapps_MemberEntry $member The member entry to insert.
param: string $uri (optional) The URI where the group should be
return: Zend_Gdata_Gapps_MemberEntry The inserted member entry as

insertOwner($owner, $uri = null)   X-Ref
Create a new group from a OwnerEntry.

param: Zend_Gdata_Gapps_OwnerEntry $owner The owner entry to insert.
param: string $uri (optional) The URI where the owner should be
return: Zend_Gdata_Gapps_OwnerEntry The inserted owner entry as

insertEmailList($emailList, $uri = null)   X-Ref
Create a new email list from an EmailListEntry.

param: Zend_Gdata_Gapps_EmailListEntry $emailList The email list entry
param: string $uri (optional) The URI where the email list should be
return: Zend_Gdata_Gapps_EmailListEntry The inserted email list entry

insertEmailListRecipient($recipient, $uri = null)   X-Ref
Create a new email list recipient from an EmailListRecipientEntry.

param: Zend_Gdata_Gapps_EmailListRecipientEntry $recipient The recipient
param: string $uri (optional) The URI where the recipient should be
return: Zend_Gdata_Gapps_EmailListRecipientEntry The inserted

__call($method, $args)   X-Ref
Provides a magic factory method to instantiate new objects with
shorter syntax than would otherwise be required by the Zend Framework
naming conventions. For more information, see Zend_Gdata_App::__call().

This overrides the default behavior of __call() so that query classes
do not need to have their domain manually set when created with
a magic factory method.

param: string $method The method name being called
param: array $args The arguments passed to the call

createUser($username, $givenName, $familyName, $password,$passwordHashFunction = null, $quotaLimitInMB = null)   X-Ref
Create a new user entry and send it to the Google Apps servers.

param: string $username The username for the new user.
param: string $givenName The given name for the new user.
param: string $familyName The family name for the new user.
param: string $password The password for the new user as a plaintext string
param: string $quotaLimitInMB (optional) The quota limit for the new user in MB.
return: Zend_Gdata_Gapps_UserEntry (optional) The new user entry as returned by

retrieveUser($username)   X-Ref
Retrieve a user based on their username.

param: string $username The username to search for.
return: Zend_Gdata_Gapps_UserEntry The username to search for, or null

retrievePageOfUsers($startUsername = null)   X-Ref
Retrieve a page of users in alphabetical order, starting with the
provided username.

param: string $startUsername (optional) The first username to retrieve.
return: Zend_Gdata_Gapps_UserFeed Collection of Zend_Gdata_UserEntry

retrieveAllUsers()   X-Ref
Retrieve all users in the current domain. Be aware that
calling this function on a domain with many users will take a
signifigant amount of time to complete. On larger domains this may
may cause execution to timeout without proper precautions in place.

return: Zend_Gdata_Gapps_UserFeed Collection of Zend_Gdata_UserEntry

updateUser($username, $userEntry)   X-Ref
Overwrite a specified username with the provided UserEntry.  The
UserEntry does not need to contain an edit link.

This method is provided for compliance with the Google Apps
Provisioning API specification. Normally users will instead want to
call UserEntry::save() instead.

param: string $username The username whose data will be overwritten.
param: Zend_Gdata_Gapps_UserEntry $userEntry The user entry which
return: Zend_Gdata_Gapps_UserEntry The UserEntry returned by the

suspendUser($username)   X-Ref
Mark a given user as suspended.

param: string $username The username associated with the user who
return: Zend_Gdata_Gapps_UserEntry The UserEntry for the modified

restoreUser($username)   X-Ref
Mark a given user as not suspended.

param: string $username The username associated with the user who
return: Zend_Gdata_Gapps_UserEntry The UserEntry for the modified

deleteUser($username)   X-Ref
Delete a user by username.

param: string $username The username associated with the user who

createNickname($username, $nickname)   X-Ref
Create a nickname for a given user.

param: string $username The username to which the new nickname should
param: string $nickname The new nickname to be created.
return: Zend_Gdata_Gapps_NicknameEntry The nickname entry which was

retrieveNickname($nickname)   X-Ref
Retrieve the entry for a specified nickname.

param: string $nickname The nickname to be retrieved.
return: Zend_Gdata_Gapps_NicknameEntry The requested nickname entry.

retrieveNicknames($username)   X-Ref
Retrieve all nicknames associated with a specific username.

param: string $username The username whose nicknames should be
return: Zend_Gdata_Gapps_NicknameFeed A feed containing all nicknames

retrievePageOfNicknames($startNickname = null)   X-Ref
Retrieve a page of nicknames in alphabetical order, starting with the
provided nickname.

param: string $startNickname (optional) The first nickname to
return: Zend_Gdata_Gapps_NicknameFeed Collection of Zend_Gdata_NicknameEntry

retrieveAllNicknames()   X-Ref
Retrieve all nicknames in the current domain. Be aware that
calling this function on a domain with many nicknames will take a
signifigant amount of time to complete. On larger domains this may
may cause execution to timeout without proper precautions in place.

return: Zend_Gdata_Gapps_NicknameFeed Collection of Zend_Gdata_NicknameEntry

deleteNickname($nickname)   X-Ref
Delete a specified nickname.

param: string $nickname The name of the nickname to be deleted.

createGroup($groupId, $groupName, $description = null, $emailPermission = null)   X-Ref
Create a new group.

param: string $groupId A unique identifier for the group
param: string $groupName The name of the group
param: string $description A description of the group
param: string $emailPermission The subscription permission of the group
return: Zend_Gdata_Gapps_GroupEntry The group entry as created on the server.

retrieveGroup($groupId)   X-Ref
Retrieves a group based on group id

param: string $groupId The unique identifier for the group
return: Zend_Gdata_Gapps_GroupEntry The group entry as returned by the server.

retrieveAllGroups()   X-Ref
Retrieve all groups in the current domain. Be aware that
calling this function on a domain with many groups will take a
signifigant amount of time to complete. On larger domains this may
may cause execution to timeout without proper precautions in place.

return: Zend_Gdata_Gapps_GroupFeed Collection of Zend_Gdata_GroupEntry objects

deleteGroup($groupId)   X-Ref
Delete a group

param: string $groupId The unique identifier for the group

isMember($memberId, $groupId)   X-Ref
Check to see if a member id or group id is a member of group

param: string $memberId Member id or group group id
param: string $groupId Group to be checked for
return: bool True, if given entity is a member

addMemberToGroup($recipientAddress, $groupId)   X-Ref
Add an email address to a group as a member

param: string $recipientAddress Email address, member id, or group id
param: string $groupId The unique id of the group
return: Zend_Gdata_Gapps_MemberEntry The member entry returned by the server

removeMemberFromGroup($memberId, $groupId)   X-Ref
Remove a member id from a group

param: string $memberId Member id or group id
param: string $groupId The unique id of the group

retrieveAllMembers($groupId)   X-Ref
Retrieves all the members of a group

param: string $groupId The unique id of the group
return: Zend_Gdata_Gapps_MemberFeed Collection of MemberEntry objects

addOwnerToGroup($email, $groupId)   X-Ref
Add an email as an owner of a group

param: string $email Owner's email
param: string $groupId Group ownership to be checked for
return: Zend_Gdata_Gapps_OwnerEntry The OwnerEntry returned by the server

retrieveGroupOwners($groupId)   X-Ref
Retrieves all the owners of a group

param: string $groupId The unique identifier for the group
return: Zend_Gdata_Gapps_OwnerFeed Collection of Zend_Gdata_OwnerEntry

isOwner($email, $groupId)   X-Ref
Checks to see if an email is an owner of a group

param: string $email Owner's email
param: string $groupId Group ownership to be checked for
return: bool True, if given entity is an owner

removeOwnerFromGroup($email, $groupId)   X-Ref
Remove email as an owner of a group

param: string $email Owner's email
param: string $groupId The unique identifier for the group

updateGroup($groupId, $groupName = null, $description = null,$emailPermission = null)   X-Ref
Update group properties with new values. any property not defined will not
be updated

param: string $groupId A unique identifier for the group
param: string $groupName The name of the group
param: string $description A description of the group
param: string $emailPermission The subscription permission of the group
return: Zend_Gdata_Gapps_GroupEntry The group entry as updated on the server.

retrieveGroups($memberId, $directOnly = null)   X-Ref
Retrieve all of the groups that a user is a member of

param: string $memberId Member username
param: bool $directOnly (Optional) If true, members with direct association
return: Zend_Gdata_Gapps_GroupFeed Collection of Zend_Gdata_GroupEntry

retrievePageOfGroups($startGroup = null)   X-Ref
Retrieve a page of groups in alphabetical order, starting with the
provided group.

param: string $startGroup (optional) The first group to
return: Zend_Gdata_Gapps_GroupFeed Collection of Zend_Gdata_GroupEntry

retrievePageOfMembers($groupId, $startMember = null)   X-Ref
Gets page of Members

param: string $groupId The group id which should be searched.
param: string $startMember (optinal) The address of the first member,
return: Zend_Gdata_Gapps_MemberFeed Collection of Zend_Gdata_MemberEntry

createEmailList($emailList)   X-Ref
Create a new email list.

param: string $emailList The name of the email list to be created.
return: Zend_Gdata_Gapps_EmailListEntry The email list entry

retrieveEmailLists($recipient)   X-Ref
Retrieve all email lists associated with a recipient.

param: string $username The recipient whose associated email lists
return: Zend_Gdata_Gapps_EmailListFeed The list of email lists found as

retrievePageOfEmailLists($startNickname = null)   X-Ref
Retrieve a page of email lists in alphabetical order, starting with the
provided email list.

param: string $startEmailListName (optional) The first list to
return: Zend_Gdata_Gapps_EmailListFeed Collection of Zend_Gdata_EmailListEntry

retrieveAllEmailLists()   X-Ref
Retrieve all email lists associated with the curent domain. Be aware that
calling this function on a domain with many email lists will take a
signifigant amount of time to complete. On larger domains this may
may cause execution to timeout without proper precautions in place.

return: Zend_Gdata_Gapps_EmailListFeed The list of email lists found

deleteEmailList($emailList)   X-Ref
Delete a specified email list.

param: string $emailList The name of the emailList to be deleted.

addRecipientToEmailList($recipientAddress, $emailList)   X-Ref
Add a specified recipient to an existing emailList.

param: string $recipientAddress The address of the recipient to be
param: string $emailList The name of the email address to which the
return: Zend_Gdata_Gapps_EmailListRecipientEntry The recipient entry

retrievePageOfRecipients($emailList,$startRecipient = null)   X-Ref
Retrieve a page of email list recipients in alphabetical order,
starting with the provided email list recipient.

param: string $emaiList The email list which should be searched.
param: string $startRecipient (optinal) The address of the first
return: Zend_Gdata_Gapps_EmailListRecipientFeed Collection of

retrieveAllRecipients($emailList)   X-Ref
Retrieve all recipients associated with an email list. Be aware that
calling this function on a domain with many email lists will take a
signifigant amount of time to complete. On larger domains this may
may cause execution to timeout without proper precautions in place.

param: string $emaiList The email list which should be searched.
return: Zend_Gdata_Gapps_EmailListRecipientFeed The list of email lists

removeRecipientFromEmailList($recipientAddress, $emailList)   X-Ref
Remove a specified recipient from an email list.

param: string $recipientAddress The recipient to be removed.
param: string $emailList The list from which the recipient should



Generated: Fri Nov 28 20:08:37 2014 Cross-referenced by PHPXref 0.7.1