Gdata/Gapps.php

Show: PublicProtectedPrivateinherited
Table of Contents
Zend Framework
LICENSE This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to [email protected] so we can send you a copy immediately.
Category
Zend  
Copyright
Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Gdata  
Subpackage
Gapps  
Version
$Id$  

\Zend_Gdata_Gapps

Package: Zend_Gdata\Gapps
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.
Parent(s)
\Zend_Gdata < \Zend_Gdata_App
Category
Zend  
Copyright
Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Link
http://code.google.com/apis/apps/gdata_provisioning_api_v2.0_reference.html  

Constants

>VConstant  APPS_BASE_FEED_URI = 'https://apps-apis.google.com/a/feeds'
>VConstant  AUTH_SERVICE_NAME = 'apps'
>VConstant  APPS_USER_PATH = '/user/2.0'
Path to user feeds on the Google Apps server.
>VConstant  APPS_NICKNAME_PATH = '/nickname/2.0'
Path to nickname feeds on the Google Apps server.
>VConstant  APPS_GROUP_PATH = '/group/2.0'
Path to group feeds on the Google Apps server.
>VConstant  APPS_EMAIL_LIST_PATH = '/emailList/2.0'
Path to email list feeds on the Google Apps server.
>VConstant  APPS_EMAIL_LIST_RECIPIENT_POSTFIX = '/recipient'
Path to email list recipient feeds on the Google Apps server.

Properties

>VPropertyprotectedstring $_domain = null
The domain which is being administered via the Provisioning API.
Default valuenullDetails
Type
string
>VPropertypublicarray $namespaces = array(array('apps', 'http://schemas.google.com/apps/2006', 1, 0))
static
Namespaces used for Zend_Gdata_Gapps
Default valuearray(array('apps', 'http://schemas.google.com/apps/2006', 1, 0))Details
Type
array

Methods

methodpublic__call(string $method, array $args) : void

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.
Parameters
NameTypeDescription
$methodstring

The method name being called

$argsarray

The arguments passed to the call

Throws
ExceptionDescription
\Zend_Gdata_App_Exception
Details
See
 
methodpublic__construct(\Zend_Http_Client $client = null, string $domain = null, string $applicationId = 'MyCompany-MyApp-1.0') : void

Create Gdata_Gapps object

Parameters
NameTypeDescription
$client\Zend_Http_Client

(optional) The HTTP client to use when

     when communicating with the Google Apps servers.
$domainstring

(optional) The Google Apps domain which is to be

     accessed.
$applicationIdstring

The identity of the app in the form of Company-AppName-Version

methodpublicaddMemberToGroup(string $recipientAddress, string $groupId) : \Zend_Gdata_Gapps_MemberEntry

Add an email address to a group as a member

Parameters
NameTypeDescription
$recipientAddressstring

Email address, member id, or group id

$groupIdstring

The unique id of the group

Returns
TypeDescription
\Zend_Gdata_Gapps_MemberEntryThe member entry returned by the server
methodpublicaddOwnerToGroup(string $email, string $groupId) : \Zend_Gdata_Gapps_OwnerEntry

Add an email as an owner of a group

Parameters
NameTypeDescription
$emailstring

Owner's email

$groupIdstring

Group ownership to be checked for

Returns
TypeDescription
\Zend_Gdata_Gapps_OwnerEntryThe OwnerEntry returned by the server
methodpublicaddRecipientToEmailList(string $recipientAddress, string $emailList) : \Zend_Gdata_Gapps_EmailListRecipientEntry

Add a specified recipient to an existing emailList.

Parameters
NameTypeDescription
$recipientAddressstring

The address of the recipient to be added to the email list.

$emailListstring

The name of the email address to which the recipient should be added.

Returns
TypeDescription
\Zend_Gdata_Gapps_EmailListRecipientEntryThe recipient entry created by the server.
Throws
ExceptionDescription
\Zend_Gdata_App_Exception
\Zend_Gdata_App_HttpException
\Zend_Gdata_Gapps_ServiceException
methodpubliccreateEmailList(string $emailList) : \Zend_Gdata_Gapps_EmailListEntry

Create a new email list.

Parameters
NameTypeDescription
$emailListstring

The name of the email list to be created.

Returns
TypeDescription
\Zend_Gdata_Gapps_EmailListEntryThe email list entry as created on the server.
Throws
ExceptionDescription
\Zend_Gdata_App_Exception
\Zend_Gdata_App_HttpException
\Zend_Gdata_Gapps_ServiceException
methodpubliccreateGroup(string $groupId, string $groupName, string $description = null, string $emailPermission = null) : \Zend_Gdata_Gapps_GroupEntry

Create a new group.

Parameters
NameTypeDescription
$groupIdstring

A unique identifier for the group

$groupNamestring

The name of the group

$descriptionstring

A description of the group

$emailPermissionstring

The subscription permission of the group

Returns
TypeDescription
\Zend_Gdata_Gapps_GroupEntryThe group entry as created on the server.
methodpubliccreateNickname(string $username, string $nickname) : \Zend_Gdata_Gapps_NicknameEntry

Create a nickname for a given user.

Parameters
NameTypeDescription
$usernamestring

The username to which the new nickname should be associated.

$nicknamestring

The new nickname to be created.

Returns
TypeDescription
\Zend_Gdata_Gapps_NicknameEntryThe nickname entry which was created by the server.
Throws
ExceptionDescription
\Zend_Gdata_App_Exception
\Zend_Gdata_App_HttpException
\Zend_Gdata_Gapps_ServiceException
methodpubliccreateUser(string $username, string $givenName, string $familyName, string $password,  $passwordHashFunction = null, string $quotaLimitInMB = null) : \Zend_Gdata_Gapps_UserEntry

Create a new user entry and send it to the Google Apps servers.

Parameters
NameTypeDescription
$usernamestring

The username for the new user.

$givenNamestring

The given name for the new user.

$familyNamestring

The family name for the new user.

$passwordstring

The password for the new user as a plaintext string

            (if $passwordHashFunction is null) or a SHA-1 hashed
            value (if $passwordHashFunction = 'SHA-1').
$passwordHashFunction
$quotaLimitInMBstring

(optional) The quota limit for the new user in MB.

Returns
TypeDescription
\Zend_Gdata_Gapps_UserEntry(optional) The new user entry as returned by server.
Throws
ExceptionDescription
\Zend_Gdata_App_Exception
\Zend_Gdata_App_HttpException
\Zend_Gdata_Gapps_ServiceException
methodpublicdelete(mixed $data, integer $remainingRedirects = null) : void

DELETE entry with client object This method overrides the default behavior of Zend_Gdata_App, providing support for Zend_Gdata_Gapps_ServiceException.

Parameters
NameTypeDescription
$datamixed

The Zend_Gdata_App_Entry or URL to delete

$remainingRedirectsinteger

(optional)

Throws
ExceptionDescription
\Zend_Gdata_App_HttpException
\Zend_Gdata_App_InvalidArgumentException
\Zend_Gdata_Gapps_ServiceException
methodpublicdeleteEmailList(string $emailList) : void

Delete a specified email list.

Parameters
NameTypeDescription
$emailListstring

The name of the emailList to be deleted.

Throws
ExceptionDescription
\Zend_Gdata_App_Exception
\Zend_Gdata_App_HttpException
\Zend_Gdata_Gapps_ServiceException
methodpublicdeleteGroup(string $groupId) : void

Delete a group

Parameters
NameTypeDescription
$groupIdstring

The unique identifier for the group

methodpublicdeleteNickname(string $nickname) : void

Delete a specified nickname.

Parameters
NameTypeDescription
$nicknamestring

The name of the nickname to be deleted.

Throws
ExceptionDescription
\Zend_Gdata_App_Exception
\Zend_Gdata_App_HttpException
\Zend_Gdata_Gapps_ServiceException
methodpublicdeleteUser(string $username) : void

Delete a user by username.

Parameters
NameTypeDescription
$usernamestring

The username associated with the user who should be deleted.

Throws
ExceptionDescription
\Zend_Gdata_App_Exception
\Zend_Gdata_App_HttpException
\Zend_Gdata_Gapps_ServiceException
methodpublicget(string $uri, array $extraHeaders = array()) : \Zend_Http_Response

GET a URI using client object.

This method overrides the default behavior of Zend_Gdata_App, providing support for Zend_Gdata_Gapps_ServiceException.
Parameters
NameTypeDescription
$uristring

GET URI

$extraHeadersarray

Extra headers to add to the request, as an

   array of string-based key/value pairs.
Returns
TypeDescription
\Zend_Http_Response
Throws
ExceptionDescription
\Zend_Gdata_App_HttpException
\Zend_Gdata_Gapps_ServiceException
methodpublicgetBaseUrl(string $domain = null) : void

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.

Parameters
NameTypeDescription
$domainstring

(optional) A fully-qualified domain to use

     instead of the default domain for this service instance.
Throws
ExceptionDescription
\Zend_Gdata_App_InvalidArgumentException
methodpublicgetDomain() : string

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.

Returns
TypeDescription
stringThe domain to be used for this session, or null if not set.
methodpublicgetEmailListEntry(mixed $location) : \Zend_Gdata_Gapps_EmailListEntry

Retreive a single EmailListEntry object.

Parameters
NameTypeDescription
$locationmixed

The location for the feed, as a URL or Query.

Returns
TypeDescription
\Zend_Gdata_Gapps_EmailListEntry
Throws
ExceptionDescription
\Zend_Gdata_App_Exception
\Zend_Gdata_App_HttpException
\Zend_Gdata_Gapps_ServiceException
methodpublicgetEmailListFeed(mixed $location = null) : \Zend_Gdata_Gapps_EmailListFeed

Retreive EmailListFeed object containing multiple EmailListEntry objects.

Parameters
NameTypeDescription
$locationmixed

(optional) The location for the feed, as a URL

     or Query.
Returns
TypeDescription
\Zend_Gdata_Gapps_EmailListFeed
Throws
ExceptionDescription
\Zend_Gdata_App_Exception
\Zend_Gdata_App_HttpException
\Zend_Gdata_Gapps_ServiceException
methodpublicgetEmailListRecipientEntry(mixed $location) : \Zend_Gdata_Gapps_EmailListRecipientEntry

Retreive a single EmailListRecipientEntry object.

Parameters
NameTypeDescription
$locationmixed

The location for the feed, as a URL or Query.

Returns
TypeDescription
\Zend_Gdata_Gapps_EmailListRecipientEntry
Throws
ExceptionDescription
\Zend_Gdata_App_Exception
\Zend_Gdata_App_HttpException
\Zend_Gdata_Gapps_ServiceException
methodpublicgetEmailListRecipientFeed(mixed $location) : \Zend_Gdata_Gapps_EmailListRecipientFeed

Retreive EmailListRecipientFeed object containing multiple EmailListRecipientEntry objects.

Parameters
NameTypeDescription
$locationmixed

The location for the feed, as a URL or Query.

Returns
TypeDescription
\Zend_Gdata_Gapps_EmailListRecipientFeed
Throws
ExceptionDescription
\Zend_Gdata_App_Exception
\Zend_Gdata_App_HttpException
\Zend_Gdata_Gapps_ServiceException
methodpublicgetGroupEntry(mixed $location = null) : \Zend_Gdata_Gapps_GroupEntry

Retreive a single GroupEntry object.

Parameters
NameTypeDescription
$locationmixed

The location for the feed, as a URL or Query.

Returns
TypeDescription
\Zend_Gdata_Gapps_GroupEntry
Throws
ExceptionDescription
\Zend_Gdata_App_Exception
\Zend_Gdata_App_HttpException
\Zend_Gdata_Gapps_ServiceException
methodpublicgetGroupFeed(mixed $location = null) : \Zend_Gdata_Gapps_GroupFeed

Retreive GroupFeed object containing multiple GroupEntry objects.

Parameters
NameTypeDescription
$locationmixed

(optional) The location for the feed, as a URL

     or Query.
Returns
TypeDescription
\Zend_Gdata_Gapps_GroupFeed
Throws
ExceptionDescription
\Zend_Gdata_App_Exception
\Zend_Gdata_App_HttpException
\Zend_Gdata_Gapps_ServiceException
methodpublicgetMemberEntry(mixed $location = null) : \Zend_Gdata_Gapps_MemberEntry

Retreive a single MemberEntry object.

Parameters
NameTypeDescription
$locationmixed

The location for the feed, as a URL or Query.

Returns
TypeDescription
\Zend_Gdata_Gapps_MemberEntry
Throws
ExceptionDescription
\Zend_Gdata_App_Exception
\Zend_Gdata_App_HttpException
\Zend_Gdata_Gapps_ServiceException
methodpublicgetMemberFeed(mixed $location = null) : \Zend_Gdata_Gapps_MemberFeed

Retreive MemberFeed object containing multiple MemberEntry objects.

Parameters
NameTypeDescription
$locationmixed

(optional) The location for the feed, as a URL

     or Query.
Returns
TypeDescription
\Zend_Gdata_Gapps_MemberFeed
Throws
ExceptionDescription
\Zend_Gdata_App_Exception
\Zend_Gdata_App_HttpException
\Zend_Gdata_Gapps_ServiceException
methodpublicgetNicknameEntry(mixed $location) : \Zend_Gdata_Gapps_NicknameEntry

Retreive a single NicknameEntry object.

Parameters
NameTypeDescription
$locationmixed

The location for the feed, as a URL or Query.

Returns
TypeDescription
\Zend_Gdata_Gapps_NicknameEntry
Throws
ExceptionDescription
\Zend_Gdata_App_Exception
\Zend_Gdata_App_HttpException
\Zend_Gdata_Gapps_ServiceException
methodpublicgetNicknameFeed(mixed $location = null) : \Zend_Gdata_Gapps_NicknameFeed

Retreive NicknameFeed object containing multiple NicknameEntry objects.

Parameters
NameTypeDescription
$locationmixed

(optional) The location for the feed, as a URL

     or Query.
Returns
TypeDescription
\Zend_Gdata_Gapps_NicknameFeed
Throws
ExceptionDescription
\Zend_Gdata_App_Exception
\Zend_Gdata_App_HttpException
\Zend_Gdata_Gapps_ServiceException
methodpublicgetOwnerEntry(mixed $location = null) : \Zend_Gdata_Gapps_OwnerEntry

Retreive a single OwnerEntry object.

Parameters
NameTypeDescription
$locationmixed

The location for the feed, as a URL or Query.

Returns
TypeDescription
\Zend_Gdata_Gapps_OwnerEntry
Throws
ExceptionDescription
\Zend_Gdata_App_Exception
\Zend_Gdata_App_HttpException
\Zend_Gdata_Gapps_ServiceException
methodpublicgetOwnerFeed(mixed $location = null) : \Zend_Gdata_Gapps_OwnerFeed

Retreive OwnerFeed object containing multiple OwnerEntry objects.

Parameters
NameTypeDescription
$locationmixed

(optional) The location for the feed, as a URL

     or Query.
Returns
TypeDescription
\Zend_Gdata_Gapps_OwnerFeed
Throws
ExceptionDescription
\Zend_Gdata_App_Exception
\Zend_Gdata_App_HttpException
\Zend_Gdata_Gapps_ServiceException
methodpublicgetUserEntry(mixed $location) : \Zend_Gdata_Gapps_UserEntry

Retreive a single UserEntry object.

Parameters
NameTypeDescription
$locationmixed

The location for the feed, as a URL or Query.

Returns
TypeDescription
\Zend_Gdata_Gapps_UserEntry
Throws
ExceptionDescription
\Zend_Gdata_App_Exception
\Zend_Gdata_App_HttpException
\Zend_Gdata_Gapps_ServiceException
methodpublicgetUserFeed(mixed $location = null) : \Zend_Gdata_Gapps_UserFeed

Retrieve a UserFeed containing multiple UserEntry objects.

Parameters
NameTypeDescription
$locationmixed

(optional) The location for the feed, as a URL

     or Query.
Returns
TypeDescription
\Zend_Gdata_Gapps_UserFeed
Throws
ExceptionDescription
\Zend_Gdata_App_Exception
\Zend_Gdata_App_HttpException
\Zend_Gdata_Gapps_ServiceException
methodpublicimport(string $uri, \Zend_Http_Client $client = null, string $className = 'Zend_Gdata_App_Feed',  $useObjectMapping = true) : \Zend_Gdata_App_Feed
static

Imports a feed located at $uri.

This method overrides the default behavior of Zend_Gdata_App, providing support for Zend_Gdata_Gapps_ServiceException.
Parameters
NameTypeDescription
$uristring
$client\Zend_Http_Client

(optional) The client used for

     communication
$classNamestring

(optional) The class which is used as the

     return type
$useObjectMapping
Returns
TypeDescription
\Zend_Gdata_App_Feed
Throws
ExceptionDescription
\Zend_Gdata_App_Exception
\Zend_Gdata_App_HttpException
\Zend_Gdata_Gapps_ServiceException
methodpublicinsertEmailList(\Zend_Gdata_Gapps_EmailListEntry $emailList, string $uri = null) : \Zend_Gdata_Gapps_EmailListEntry

Create a new email list from an EmailListEntry.

Parameters
NameTypeDescription
$emailList\Zend_Gdata_Gapps_EmailListEntry

The email list entry to insert.

$uristring

(optional) The URI where the email list should be

     uploaded to. If null, the default email list creation URI for
     this domain will be used.
Returns
TypeDescription
\Zend_Gdata_Gapps_EmailListEntryThe inserted email list entry as returned by the server.
Throws
ExceptionDescription
\Zend_Gdata_App_Exception
\Zend_Gdata_App_HttpException
\Zend_Gdata_Gapps_ServiceException
methodpublicinsertEmailListRecipient(\Zend_Gdata_Gapps_EmailListRecipientEntry $recipient, string $uri = null) : \Zend_Gdata_Gapps_EmailListRecipientEntry

Create a new email list recipient from an EmailListRecipientEntry.

Parameters
NameTypeDescription
$recipient\Zend_Gdata_Gapps_EmailListRecipientEntry

The recipient entry to insert.

$uristring

(optional) The URI where the recipient should be

     uploaded to. If null, the default recipient creation URI for
     this domain will be used.
Returns
TypeDescription
\Zend_Gdata_Gapps_EmailListRecipientEntryThe inserted recipient entry as returned by the server.
Throws
ExceptionDescription
\Zend_Gdata_App_Exception
\Zend_Gdata_App_HttpException
\Zend_Gdata_Gapps_ServiceException
methodpublicinsertGroup(\Zend_Gdata_Gapps_GroupEntry $group, string $uri = null) : \Zend_Gdata_Gapps_GroupEntry

Create a new group from a GroupEntry.

Parameters
NameTypeDescription
$group\Zend_Gdata_Gapps_GroupEntry

The group entry to insert.

$uristring

(optional) The URI where the group should be

     uploaded to. If null, the default user creation URI for
     this domain will be used.
Returns
TypeDescription
\Zend_Gdata_Gapps_GroupEntryThe inserted group entry as returned by the server.
Throws
ExceptionDescription
\Zend_Gdata_App_Exception
\Zend_Gdata_App_HttpException
\Zend_Gdata_Gapps_ServiceException
methodpublicinsertMember(\Zend_Gdata_Gapps_MemberEntry $member, string $uri = null) : \Zend_Gdata_Gapps_MemberEntry

Create a new member from a MemberEntry.

Parameters
NameTypeDescription
$member\Zend_Gdata_Gapps_MemberEntry

The member entry to insert.

$uristring

(optional) The URI where the group should be

     uploaded to. If null, the default user creation URI for
     this domain will be used.
Returns
TypeDescription
\Zend_Gdata_Gapps_MemberEntryThe inserted member entry as returned by the server.
Throws
ExceptionDescription
\Zend_Gdata_App_Exception
\Zend_Gdata_App_HttpException
\Zend_Gdata_Gapps_ServiceException
methodpublicinsertNickname(\Zend_Gdata_Gapps_NicknameEntry $nickname, string $uri = null) : \Zend_Gdata_Gapps_NicknameEntry

Create a new nickname from a NicknameEntry.

Parameters
NameTypeDescription
$nickname\Zend_Gdata_Gapps_NicknameEntry

The nickname entry to insert.

$uristring

(optional) The URI where the nickname should be

     uploaded to. If null, the default nickname creation URI for
     this domain will be used.
Returns
TypeDescription
\Zend_Gdata_Gapps_NicknameEntryThe inserted nickname entry as returned by the server.
Throws
ExceptionDescription
\Zend_Gdata_App_Exception
\Zend_Gdata_App_HttpException
\Zend_Gdata_Gapps_ServiceException
methodpublicinsertOwner(\Zend_Gdata_Gapps_OwnerEntry $owner, string $uri = null) : \Zend_Gdata_Gapps_OwnerEntry

Create a new group from a OwnerEntry.

Parameters
NameTypeDescription
$owner\Zend_Gdata_Gapps_OwnerEntry

The owner entry to insert.

$uristring

(optional) The URI where the owner should be

     uploaded to. If null, the default user creation URI for
     this domain will be used.
Returns
TypeDescription
\Zend_Gdata_Gapps_OwnerEntryThe inserted owner entry as returned by the server.
Throws
ExceptionDescription
\Zend_Gdata_App_Exception
\Zend_Gdata_App_HttpException
\Zend_Gdata_Gapps_ServiceException
methodpublicinsertUser(\Zend_Gdata_Gapps_UserEntry $user, string $uri = null) : \Zend_Gdata_Gapps_UserEntry

Create a new user from a UserEntry.

Parameters
NameTypeDescription
$user\Zend_Gdata_Gapps_UserEntry

The user entry to insert.

$uristring

(optional) The URI where the user should be

     uploaded to. If null, the default user creation URI for
     this domain will be used.
Returns
TypeDescription
\Zend_Gdata_Gapps_UserEntryThe inserted user entry as returned by the server.
Throws
ExceptionDescription
\Zend_Gdata_App_Exception
\Zend_Gdata_App_HttpException
\Zend_Gdata_Gapps_ServiceException
methodpublicisMember(string $memberId, string $groupId) : bool

Check to see if a member id or group id is a member of group

Parameters
NameTypeDescription
$memberIdstring

Member id or group group id

$groupIdstring

Group to be checked for

Returns
TypeDescription
boolTrue, if given entity is a member
methodpublicisOwner(string $email, string $groupId) : bool

Checks to see if an email is an owner of a group

Parameters
NameTypeDescription
$emailstring

Owner's email

$groupIdstring

Group ownership to be checked for

Returns
TypeDescription
boolTrue, if given entity is an owner
methodpublicpost(mixed $data, string $uri = null, integer $remainingRedirects = null, string $contentType = null,  $extraHeaders = null) : \Zend_Http_Response

POST data with client object.

This method overrides the default behavior of Zend_Gdata_App, providing support for Zend_Gdata_Gapps_ServiceException.
Parameters
NameTypeDescription
$datamixed

The Zend_Gdata_App_Entry or XML to post

$uristring

(optional) POST URI

$remainingRedirectsinteger

(optional)

$contentTypestring

Content-type of the data

$extraHeaders
Returns
TypeDescription
\Zend_Http_Response
Throws
ExceptionDescription
\Zend_Gdata_App_HttpException
\Zend_Gdata_App_InvalidArgumentException
\Zend_Gdata_Gapps_ServiceException
methodpublicput(mixed $data, string $uri = null, integer $remainingRedirects = null, string $contentType = null,  $extraHeaders = null) : \Zend_Http_Response

PUT data with client object This method overrides the default behavior of Zend_Gdata_App, providing support for Zend_Gdata_Gapps_ServiceException.

Parameters
NameTypeDescription
$datamixed

The Zend_Gdata_App_Entry or XML to post

$uristring

(optional) PUT URI

$remainingRedirectsinteger

(optional)

$contentTypestring

Content-type of the data

$extraHeaders
Returns
TypeDescription
\Zend_Http_Response
Throws
ExceptionDescription
\Zend_Gdata_App_HttpException
\Zend_Gdata_App_InvalidArgumentException
\Zend_Gdata_Gapps_ServiceException
methodpublicremoveMemberFromGroup(string $memberId, string $groupId) : void

Remove a member id from a group

Parameters
NameTypeDescription
$memberIdstring

Member id or group id

$groupIdstring

The unique id of the group

methodpublicremoveOwnerFromGroup(string $email, string $groupId) : void

Remove email as an owner of a group

Parameters
NameTypeDescription
$emailstring

Owner's email

$groupIdstring

The unique identifier for the group

methodpublicremoveRecipientFromEmailList(string $recipientAddress, string $emailList) : void

Remove a specified recipient from an email list.

Parameters
NameTypeDescription
$recipientAddressstring

The recipient to be removed.

$emailListstring

The list from which the recipient should be removed.

Throws
ExceptionDescription
\Zend_Gdata_App_Exception
\Zend_Gdata_App_HttpException
\Zend_Gdata_Gapps_ServiceException
methodpublicrestoreUser(string $username) : \Zend_Gdata_Gapps_UserEntry

Mark a given user as not suspended.

Parameters
NameTypeDescription
$usernamestring

The username associated with the user who should be restored.

Returns
TypeDescription
\Zend_Gdata_Gapps_UserEntryThe UserEntry for the modified user.
Throws
ExceptionDescription
\Zend_Gdata_App_Exception
\Zend_Gdata_App_HttpException
\Zend_Gdata_Gapps_ServiceException
methodpublicretrieveAllEmailLists() : \Zend_Gdata_Gapps_EmailListFeed

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.

Returns
TypeDescription
\Zend_Gdata_Gapps_EmailListFeedThe list of email lists found as Zend_Gdata_Gapps_EmailListEntry objects.
Throws
ExceptionDescription
\Zend_Gdata_App_Exception
\Zend_Gdata_App_HttpException
\Zend_Gdata_Gapps_ServiceException
methodpublicretrieveAllGroups() : \Zend_Gdata_Gapps_GroupFeed

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.

Returns
TypeDescription
\Zend_Gdata_Gapps_GroupFeedCollection of Zend_Gdata_GroupEntry objects representing all groups apart of the domain.
methodpublicretrieveAllMembers(string $groupId) : \Zend_Gdata_Gapps_MemberFeed

Retrieves all the members of a group

Parameters
NameTypeDescription
$groupIdstring

The unique id of the group

Returns
TypeDescription
\Zend_Gdata_Gapps_MemberFeedCollection of MemberEntry objects representing all members apart of the group.
methodpublicretrieveAllNicknames() : \Zend_Gdata_Gapps_NicknameFeed

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.

Returns
TypeDescription
\Zend_Gdata_Gapps_NicknameFeedCollection of Zend_Gdata_NicknameEntry objects representing all nicknames in the domain.
Throws
ExceptionDescription
\Zend_Gdata_App_Exception
\Zend_Gdata_App_HttpException
\Zend_Gdata_Gapps_ServiceException
methodpublicretrieveAllRecipients( $emailList) : \Zend_Gdata_Gapps_EmailListRecipientFeed

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.

Parameters
NameTypeDescription
$emailList
Returns
TypeDescription
\Zend_Gdata_Gapps_EmailListRecipientFeedThe list of email lists found as Zend_Gdata_Gapps_EmailListRecipientEntry objects.
Throws
ExceptionDescription
\Zend_Gdata_App_Exception
\Zend_Gdata_App_HttpException
\Zend_Gdata_Gapps_ServiceException
methodpublicretrieveAllUsers() : \Zend_Gdata_Gapps_UserFeed

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.

Returns
TypeDescription
\Zend_Gdata_Gapps_UserFeedCollection of Zend_Gdata_UserEntry objects representing all users in the domain.
Throws
ExceptionDescription
\Zend_Gdata_App_Exception
\Zend_Gdata_App_HttpException
\Zend_Gdata_Gapps_ServiceException
methodpublicretrieveEmailLists( $recipient) : \Zend_Gdata_Gapps_EmailListFeed

Retrieve all email lists associated with a recipient.

Parameters
NameTypeDescription
$recipient
Returns
TypeDescription
\Zend_Gdata_Gapps_EmailListFeedThe list of email lists found as Zend_Gdata_EmailListEntry objects.
Throws
ExceptionDescription
\Zend_Gdata_App_Exception
\Zend_Gdata_App_HttpException
\Zend_Gdata_Gapps_ServiceException
methodpublicretrieveGroup(string $groupId) : \Zend_Gdata_Gapps_GroupEntry

Retrieves a group based on group id

Parameters
NameTypeDescription
$groupIdstring

The unique identifier for the group

Returns
TypeDescription
\Zend_Gdata_Gapps_GroupEntryThe group entry as returned by the server.
methodpublicretrieveGroupOwners(string $groupId) : \Zend_Gdata_Gapps_OwnerFeed

Retrieves all the owners of a group

Parameters
NameTypeDescription
$groupIdstring

The unique identifier for the group

Returns
TypeDescription
\Zend_Gdata_Gapps_OwnerFeedCollection of Zend_Gdata_OwnerEntry objects representing all owners apart of the group.
methodpublicretrieveGroups(string $memberId, bool $directOnly = null) : \Zend_Gdata_Gapps_GroupFeed

Retrieve all of the groups that a user is a member of

Parameters
NameTypeDescription
$memberIdstring

Member username

$directOnlybool

(Optional) If true, members with direct association

        only will be considered
Returns
TypeDescription
\Zend_Gdata_Gapps_GroupFeedCollection of Zend_Gdata_GroupEntry objects representing all groups member is apart of in the domain.
methodpublicretrieveNickname(string $nickname) : \Zend_Gdata_Gapps_NicknameEntry

Retrieve the entry for a specified nickname.

Parameters
NameTypeDescription
$nicknamestring

The nickname to be retrieved.

Returns
TypeDescription
\Zend_Gdata_Gapps_NicknameEntryThe requested nickname entry.
Throws
ExceptionDescription
\Zend_Gdata_App_Exception
\Zend_Gdata_App_HttpException
\Zend_Gdata_Gapps_ServiceException
methodpublicretrieveNicknames(string $username) : \Zend_Gdata_Gapps_NicknameFeed

Retrieve all nicknames associated with a specific username.

Parameters
NameTypeDescription
$usernamestring

The username whose nicknames should be returned.

Returns
TypeDescription
\Zend_Gdata_Gapps_NicknameFeedA feed containing all nicknames for the given user, or null if
Throws
ExceptionDescription
\Zend_Gdata_App_Exception
\Zend_Gdata_App_HttpException
\Zend_Gdata_Gapps_ServiceException
methodpublicretrievePageOfEmailLists( $startNickname = null) : \Zend_Gdata_Gapps_EmailListFeed

Retrieve a page of email lists in alphabetical order, starting with the provided email list.

Parameters
NameTypeDescription
$startNickname
Returns
TypeDescription
\Zend_Gdata_Gapps_EmailListFeedCollection of Zend_Gdata_EmailListEntry objects representing all nicknames in the domain.
Throws
ExceptionDescription
\Zend_Gdata_App_Exception
\Zend_Gdata_App_HttpException
\Zend_Gdata_Gapps_ServiceException
methodpublicretrievePageOfGroups(string $startGroup = null) : \Zend_Gdata_Gapps_GroupFeed

Retrieve a page of groups in alphabetical order, starting with the provided group.

Parameters
NameTypeDescription
$startGroupstring

(optional) The first group to

         retrieve. If null or not defined, the page will begin
         with the first group in the domain.
Returns
TypeDescription
\Zend_Gdata_Gapps_GroupFeedCollection of Zend_Gdata_GroupEntry objects representing the groups in the domain.
Throws
ExceptionDescription
\Zend_Gdata_App_Exception
\Zend_Gdata_App_HttpException
\Zend_Gdata_Gapps_ServiceException
methodpublicretrievePageOfMembers(string $groupId, string $startMember = null) : \Zend_Gdata_Gapps_MemberFeed

Gets page of Members

Parameters
NameTypeDescription
$groupIdstring

The group id which should be searched.

$startMemberstring

(optinal) The address of the first member,

         or null to start with the first member in the list.
Returns
TypeDescription
\Zend_Gdata_Gapps_MemberFeedCollection of Zend_Gdata_MemberEntry objects
methodpublicretrievePageOfNicknames(string $startNickname = null) : \Zend_Gdata_Gapps_NicknameFeed

Retrieve a page of nicknames in alphabetical order, starting with the provided nickname.

Parameters
NameTypeDescription
$startNicknamestring

(optional) The first nickname to

     retrieve. If null or not declared, the page will begin with
     the first nickname in the domain.
Returns
TypeDescription
\Zend_Gdata_Gapps_NicknameFeedCollection of Zend_Gdata_NicknameEntry objects representing all nicknames in the domain.
Throws
ExceptionDescription
\Zend_Gdata_App_Exception
\Zend_Gdata_App_HttpException
\Zend_Gdata_Gapps_ServiceException
methodpublicretrievePageOfRecipients( $emailList, string $startRecipient = null) : \Zend_Gdata_Gapps_EmailListRecipientFeed

Retrieve a page of email list recipients in alphabetical order, starting with the provided email list recipient.

Parameters
NameTypeDescription
$emailList
$startRecipientstring

(optinal) The address of the first

         recipient, or null to start with the first recipient in
         the list.
Returns
TypeDescription
\Zend_Gdata_Gapps_EmailListRecipientFeedCollection of Zend_Gdata_EmailListRecipientEntry objects representing all recpients in the specified list.
Throws
ExceptionDescription
\Zend_Gdata_App_Exception
\Zend_Gdata_App_HttpException
\Zend_Gdata_Gapps_ServiceException
methodpublicretrievePageOfUsers(string $startUsername = null) : \Zend_Gdata_Gapps_UserFeed

Retrieve a page of users in alphabetical order, starting with the provided username.

Parameters
NameTypeDescription
$startUsernamestring

(optional) The first username to retrieve.

     If null or not declared, the page will begin with the first
     user in the domain.
Returns
TypeDescription
\Zend_Gdata_Gapps_UserFeedCollection of Zend_Gdata_UserEntry objects representing all users in the domain.
Throws
ExceptionDescription
\Zend_Gdata_App_Exception
\Zend_Gdata_App_HttpException
\Zend_Gdata_Gapps_ServiceException
methodpublicretrieveUser(string $username) : \Zend_Gdata_Gapps_UserEntry

Retrieve a user based on their username.

Parameters
NameTypeDescription
$usernamestring

The username to search for.

Returns
TypeDescription
\Zend_Gdata_Gapps_UserEntryThe username to search for, or null if no match found.
Throws
ExceptionDescription
\Zend_Gdata_App_InvalidArgumentException
\Zend_Gdata_App_HttpException
methodpublicsetDomain(string $value) : void

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.
Parameters
NameTypeDescription
$valuestring

The domain to be used for this session.

methodpublicsuspendUser(string $username) : \Zend_Gdata_Gapps_UserEntry

Mark a given user as suspended.

Parameters
NameTypeDescription
$usernamestring

The username associated with the user who should be suspended.

Returns
TypeDescription
\Zend_Gdata_Gapps_UserEntryThe UserEntry for the modified user.
Throws
ExceptionDescription
\Zend_Gdata_App_Exception
\Zend_Gdata_App_HttpException
\Zend_Gdata_Gapps_ServiceException
methodpublicthrowServiceExceptionIfDetected(\Zend_Gdata_Exception $e) : void
static

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.

Parameters
NameTypeDescription
$e\Zend_Gdata_Exception

The exception to convert.

Throws
ExceptionDescription
\Zend_Gdata_Gapps_ServiceException
mixed
methodpublicupdateGroup(string $groupId, string $groupName = null, string $description = null, string $emailPermission = null) : \Zend_Gdata_Gapps_GroupEntry

Update group properties with new values. any property not defined will not be updated

Parameters
NameTypeDescription
$groupIdstring

A unique identifier for the group

$groupNamestring

The name of the group

$descriptionstring

A description of the group

$emailPermissionstring

The subscription permission of the group

Returns
TypeDescription
\Zend_Gdata_Gapps_GroupEntryThe group entry as updated on the server.
methodpublicupdateUser(string $username, \Zend_Gdata_Gapps_UserEntry $userEntry) : \Zend_Gdata_Gapps_UserEntry

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.
Parameters
NameTypeDescription
$usernamestring

The username whose data will be overwritten.

$userEntry\Zend_Gdata_Gapps_UserEntry

The user entry which will be overwritten.

Returns
TypeDescription
\Zend_Gdata_Gapps_UserEntryThe UserEntry returned by the server.
Throws
ExceptionDescription
\Zend_Gdata_App_Exception
\Zend_Gdata_App_HttpException
\Zend_Gdata_Gapps_ServiceException
Details
See
 
Documentation was generated by phpDocumentor 2.2.0 .