import v1.1.0_beta1 | 2009-08-21

This commit is contained in:
2019-07-17 22:16:19 +02:00
parent 2c1152f0d3
commit 8dee6b1a10
2306 changed files with 251360 additions and 23428 deletions

View File

@ -37,13 +37,13 @@ require_once 'Zend/Gdata/Gapps/Extension/EmailList.php';
/**
* Data model class for a Google Apps Email List Entry.
*
* Each email list entry describes a single email list within a Google Apps
* hosted domain. Email lists may contain multiple recipients, as
* described by instances of Zend_Gdata_Gapps_EmailListRecipient. Multiple
*
* Each email list entry describes a single email list within a Google Apps
* hosted domain. Email lists may contain multiple recipients, as
* described by instances of Zend_Gdata_Gapps_EmailListRecipient. Multiple
* entries are contained within instances of Zend_Gdata_Gapps_EmailListFeed.
*
* To transfer email list entries to and from the Google Apps servers,
*
* To transfer email list entries to and from the Google Apps servers,
* including creating new entries, refer to the Google Apps service class,
* Zend_Gdata_Gapps.
*
@ -51,6 +51,7 @@ require_once 'Zend/Gdata/Gapps/Extension/EmailList.php';
*
* @category Zend
* @package Zend_Gdata
* @subpackage Gapps
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
@ -58,34 +59,32 @@ class Zend_Gdata_Gapps_EmailListEntry extends Zend_Gdata_Entry
{
protected $_entryClassName = 'Zend_Gdata_Gapps_EmailListEntry';
/**
* <apps:emailList> child element containing general information about
* <apps:emailList> child element containing general information about
* this email list.
*
*
* @var Zend_Gdata_Gapps_Extension_EmailList
*/
protected $_emailList = null;
/**
* <gd:feedLink> element containing information about other feeds
* <gd:feedLink> element containing information about other feeds
* relevant to this entry.
*
*
* @var Zend_Gdata_Extension_FeedLink
*/
protected $_feedLink = array();
/**
* Create a new instance.
*
*
* @param DOMElement $element (optional) DOMElement from which this
* object should be constructed.
*/
public function __construct($element = null)
{
foreach (Zend_Gdata_Gapps::$namespaces as $nsPrefix => $nsUri) {
$this->registerNamespace($nsPrefix, $nsUri);
}
$this->registerAllNamespaces(Zend_Gdata_Gapps::$namespaces);
parent::__construct($element);
}
@ -119,14 +118,14 @@ class Zend_Gdata_Gapps_EmailListEntry extends Zend_Gdata_Entry
protected function takeChildFromDOM($child)
{
$absoluteNodeName = $child->namespaceURI . ':' . $child->localName;
switch ($absoluteNodeName) {
case $this->lookupNamespace('apps') . ':' . 'emailList';
case $this->lookupNamespace('apps') . ':' . 'emailList';
$emailList = new Zend_Gdata_Gapps_Extension_EmailList();
$emailList->transferFromDOM($child);
$this->_emailList = $emailList;
break;
case $this->lookupNamespace('gd') . ':' . 'feedLink';
case $this->lookupNamespace('gd') . ':' . 'feedLink';
$feedLink = new Zend_Gdata_Extension_FeedLink();
$feedLink->transferFromDOM($child);
$this->_feedLink[] = $feedLink;
@ -141,7 +140,7 @@ class Zend_Gdata_Gapps_EmailListEntry extends Zend_Gdata_Entry
* Retrieve the email list property for this entry.
*
* @see setEmailList
* @return Zend_Gdata_Gapps_Extension_EmailList The requested object
* @return Zend_Gdata_Gapps_Extension_EmailList The requested object
* or null if not set.
*/
public function getEmailList()
@ -150,13 +149,13 @@ class Zend_Gdata_Gapps_EmailListEntry extends Zend_Gdata_Entry
}
/**
* Set the email list property for this entry. This property contains
* Set the email list property for this entry. This property contains
* information such as the name of this email list.
*
* This corresponds to the <apps:emailList> property in the Google Data
*
* This corresponds to the <apps:emailList> property in the Google Data
* protocol.
*
* @param Zend_Gdata_Gapps_Extension_EmailList $value The desired value
*
* @param Zend_Gdata_Gapps_Extension_EmailList $value The desired value
* this element, or null to unset.
* @return Zend_Gdata_Gapps_EventEntry Provides a fluent interface
*/
@ -168,15 +167,15 @@ class Zend_Gdata_Gapps_EmailListEntry extends Zend_Gdata_Entry
/**
* Get the feed link property for this entry.
*
*
* @see setFeedLink
* @param string $rel (optional) The rel value of the link to be found.
* If null, the array of links is returned.
* @return mixed If $rel is specified, a Zend_Gdata_Extension_FeedLink
* object corresponding to the requested rel value is returned
* if found, or null if the requested value is not found. If
* $rel is null or not specified, an array of all available
* feed links for this entry is returned, or null if no feed
* @return mixed If $rel is specified, a Zend_Gdata_Extension_FeedLink
* object corresponding to the requested rel value is returned
* if found, or null if the requested value is not found. If
* $rel is null or not specified, an array of all available
* feed links for this entry is returned, or null if no feed
* links are set.
*/
public function getFeedLink($rel = null)
@ -194,14 +193,14 @@ class Zend_Gdata_Gapps_EmailListEntry extends Zend_Gdata_Entry
}
/**
* Set the feed link property for this entry. Feed links provide
* Set the feed link property for this entry. Feed links provide
* information about other feeds associated with this entry.
*
* This corresponds to the <gd:feedLink> property in the Google Data
*
* This corresponds to the <gd:feedLink> property in the Google Data
* protocol.
*
* @param array $value A collection of Zend_Gdata_Gapps_Extension_FeedLink
* instances representing all feed links for this entry, or
*
* @param array $value A collection of Zend_Gdata_Gapps_Extension_FeedLink
* instances representing all feed links for this entry, or
* null to unset.
* @return Zend_Gdata_Gapps_EventEntry Provides a fluent interface
*/

View File

@ -39,6 +39,7 @@ require_once 'Zend/Gdata/Gapps/EmailListEntry.php';
*
* @category Zend
* @package Zend_Gdata
* @subpackage Gapps
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/

View File

@ -35,6 +35,7 @@ require_once('Zend/Gdata/Gapps/Query.php');
*
* @category Zend
* @package Zend_Gdata
* @subpackage Gapps
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/

View File

@ -32,21 +32,22 @@ require_once 'Zend/Gdata/Extension/Who.php';
/**
* Data model class for a Google Apps Email List Recipient Entry.
*
* Each instance of this class represents a recipient of an email list
* hosted on a Google Apps domain. Each email list may contain multiple
* recipients. Email lists themselves are described by
* Zend_Gdata_EmailListEntry. Multiple recipient entries are contained within
*
* Each instance of this class represents a recipient of an email list
* hosted on a Google Apps domain. Each email list may contain multiple
* recipients. Email lists themselves are described by
* Zend_Gdata_EmailListEntry. Multiple recipient entries are contained within
* instances of Zend_Gdata_Gapps_EmailListRecipientFeed.
*
* To transfer email list recipients to and from the Google Apps servers,
* To transfer email list recipients to and from the Google Apps servers,
* including creating new recipients, refer to the Google Apps service class,
* Zend_Gdata_Gapps.
*
* This class represents <atom:entry> in the Google Data protocol.
*
*
* @category Zend
* @package Zend_Gdata
* @subpackage Gapps
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
@ -54,27 +55,25 @@ class Zend_Gdata_Gapps_EmailListRecipientEntry extends Zend_Gdata_Entry
{
protected $_entryClassName = 'Zend_Gdata_Gapps_EmailListRecipientEntry';
/**
* <gd:who> element used to store the email address of the current
* recipient. Only the email property of this element should be
/**
* <gd:who> element used to store the email address of the current
* recipient. Only the email property of this element should be
* populated.
*
* @var Zend_Gdata_Extension_Who
*/
protected $_who = null;
/**
* Create a new instance.
*
*
* @param DOMElement $element (optional) DOMElement from which this
* object should be constructed.
*/
public function __construct($element = null)
{
foreach (Zend_Gdata_Gapps::$namespaces as $nsPrefix => $nsUri) {
$this->registerNamespace($nsPrefix, $nsUri);
}
$this->registerAllNamespaces(Zend_Gdata_Gapps::$namespaces);
parent::__construct($element);
}
@ -95,7 +94,7 @@ class Zend_Gdata_Gapps_EmailListRecipientEntry extends Zend_Gdata_Entry
}
return $element;
}
/**
* Creates individual Entry objects of the appropriate type and
* stores them as members of this entry based upon DOM data.
@ -105,9 +104,9 @@ class Zend_Gdata_Gapps_EmailListRecipientEntry extends Zend_Gdata_Entry
protected function takeChildFromDOM($child)
{
$absoluteNodeName = $child->namespaceURI . ':' . $child->localName;
switch ($absoluteNodeName) {
case $this->lookupNamespace('gd') . ':' . 'who';
case $this->lookupNamespace('gd') . ':' . 'who';
$who = new Zend_Gdata_Extension_Who();
$who->transferFromDOM($child);
$this->_who = $who;
@ -130,10 +129,10 @@ class Zend_Gdata_Gapps_EmailListRecipientEntry extends Zend_Gdata_Entry
}
/**
* Set the value of the who property for this object. This property
* Set the value of the who property for this object. This property
* is used to store the email address of the current recipient.
*
* @param Zend_Gdata_Extension_Who $value The desired value for this
*
* @param Zend_Gdata_Extension_Who $value The desired value for this
* instance's who property.
* @return Zend_Gdata_Gapps_EventEntry Provides a fluent interface.
*/

View File

@ -39,6 +39,7 @@ require_once 'Zend/Gdata/Gapps/EmailListRecipientEntry.php';
*
* @category Zend
* @package Zend_Gdata
* @subpackage Gapps
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/

View File

@ -35,6 +35,7 @@ require_once('Zend/Gdata/Gapps/Query.php');
*
* @category Zend
* @package Zend_Gdata
* @subpackage Gapps
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/

View File

@ -37,6 +37,7 @@ require_once 'Zend/Gdata/App/Base.php';
*
* @category Zend
* @package Zend_Gdata
* @subpackage Gapps
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/

View File

@ -31,12 +31,13 @@ require_once 'Zend/Gdata/Extension.php';
require_once 'Zend/Gdata/Gapps.php';
/**
* Represents the apps:emailList element used by the Apps data API. This
* class represents properties of an email list and is usually contained
* Represents the apps:emailList element used by the Apps data API. This
* class represents properties of an email list and is usually contained
* within an instance of Zend_Gdata_Gapps_EmailListEntry.
*
* @category Zend
* @package Zend_Gdata
* @subpackage Gapps
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
@ -45,37 +46,35 @@ class Zend_Gdata_Gapps_Extension_EmailList extends Zend_Gdata_Extension
protected $_rootNamespace = 'apps';
protected $_rootElement = 'emailList';
/**
* The name of the email list. This name is used as the email address
* The name of the email list. This name is used as the email address
* for this list.
*
*
* @var string
*/
protected $_name = null;
/**
* Constructs a new Zend_Gdata_Gapps_Extension_EmailList object.
*
*
* @param string $name (optional) The name to be used for this email list.
*/
public function __construct($name = null)
public function __construct($name = null)
{
foreach (Zend_Gdata_Gapps::$namespaces as $nsPrefix => $nsUri) {
$this->registerNamespace($nsPrefix, $nsUri);
}
parent::__construct();
$this->_name = $name;
$this->registerAllNamespaces(Zend_Gdata_Gapps::$namespaces);
parent::__construct();
$this->_name = $name;
}
/**
* Retrieves a DOMElement which corresponds to this element and all
* Retrieves a DOMElement which corresponds to this element and all
* child properties. This is used to build an entry back into a DOM
* and eventually XML text for sending to the server upon updates, or
* for application storage/persistence.
* for application storage/persistence.
*
* @param DOMDocument $doc The DOMDocument used to construct DOMElements
* @return DOMElement The DOMElement representing this element and all
* @return DOMElement The DOMElement representing this element and all
* child properties.
*/
public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
@ -89,7 +88,7 @@ class Zend_Gdata_Gapps_Extension_EmailList extends Zend_Gdata_Extension
/**
* Given a DOMNode representing an attribute, tries to map the data into
* instance members. If no mapping is defined, the name and value are
* instance members. If no mapping is defined, the name and value are
* stored in an array.
*
* @param DOMNode $attribute The DOMNode attribute needed to be handled
@ -117,8 +116,8 @@ class Zend_Gdata_Gapps_Extension_EmailList extends Zend_Gdata_Extension
}
/**
* Set the value for this element's name attribute. This is the unique
* name which will be used to identify this email list within this
* Set the value for this element's name attribute. This is the unique
* name which will be used to identify this email list within this
* domain, and will be used to form this email list's email address.
*
* @param string $value The desired value for this attribute.
@ -133,7 +132,7 @@ class Zend_Gdata_Gapps_Extension_EmailList extends Zend_Gdata_Extension
/**
* Magic toString method allows using this directly via echo
* Works best in PHP >= 4.2.0
*
*
* @return string
*/
public function __toString()

View File

@ -31,13 +31,14 @@ require_once 'Zend/Gdata/Extension.php';
require_once 'Zend/Gdata/Gapps.php';
/**
* Represents the apps:login element used by the Apps data API. This
* class is used to describe properties of a user, and is usually contained
* within instances of Zene_Gdata_Gapps_UserEntry or any other class
* Represents the apps:login element used by the Apps data API. This
* class is used to describe properties of a user, and is usually contained
* within instances of Zene_Gdata_Gapps_UserEntry or any other class
* which is linked to a particular username.
*
* @category Zend
* @package Zend_Gdata
* @subpackage Gapps
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
@ -46,94 +47,92 @@ class Zend_Gdata_Gapps_Extension_Login extends Zend_Gdata_Extension
protected $_rootNamespace = 'apps';
protected $_rootElement = 'login';
/**
* The username for this user. This is used as the user's email address
* The username for this user. This is used as the user's email address
* and when logging in to Google Apps-hosted services.
*
*
* @var string
*/
protected $_username = null;
/**
* The password for the user. May be in cleartext or as an SHA-1
* The password for the user. May be in cleartext or as an SHA-1
* digest, depending on the value of _hashFunctionName.
*
*
* @var string
*/
protected $_password = null;
/**
* Specifies whether the password stored in _password is in cleartext
* or is an SHA-1 digest of a password. If the password is cleartext,
* then this should be null. If the password is an SHA-1 digest, then
* Specifies whether the password stored in _password is in cleartext
* or is an SHA-1 digest of a password. If the password is cleartext,
* then this should be null. If the password is an SHA-1 digest, then
* this should be set to 'SHA-1'.
*
*
* At the time of writing, no other hash functions are supported
*
*
* @var string
*/
protected $_hashFunctionName = null;
/**
* True if the user has administrative rights for this domain, false
* True if the user has administrative rights for this domain, false
* otherwise.
*
*
* @var boolean
*/
protected $_admin = null;
/**
* True if the user has agreed to the terms of service for Google Apps,
* false otherwise.
*
*
* @var boolean.
*/
protected $_agreedToTerms = null;
/**
* True if this user has been suspended, false otherwise.
*
*
* @var boolean
*/
protected $_suspended = null;
/**
* True if the user will be required to change their password at
* True if the user will be required to change their password at
* their next login, false otherwise.
*
*
* @var boolean
*/
protected $_changePasswordAtNextLogin = null;
/**
* Constructs a new Zend_Gdata_Gapps_Extension_Login object.
*
* @param string $username (optional) The username to be used for this
*
* @param string $username (optional) The username to be used for this
* login.
* @param string $password (optional) The password to be used for this
* @param string $password (optional) The password to be used for this
* login.
* @param string $hashFunctionName (optional) The name of the hash
* function used to protect the password, or null if no
* has function has been applied. As of this writing,
* @param string $hashFunctionName (optional) The name of the hash
* function used to protect the password, or null if no
* has function has been applied. As of this writing,
* the only valid values are 'SHA-1' or null.
* @param boolean $admin (optional) Whether the user is an administrator
* @param boolean $admin (optional) Whether the user is an administrator
* or not.
* @param boolean $suspended (optional) Whether this login is suspended or not.
* @param boolean $changePasswordAtNextLogin (optional) Whether
* the user is required to change their password at their
* @param boolean $changePasswordAtNextLogin (optional) Whether
* the user is required to change their password at their
* next login.
* @param boolean $agreedToTerms (optional) Whether the user has
* @param boolean $agreedToTerms (optional) Whether the user has
* agreed to the terms of service.
*/
public function __construct($username = null, $password = null,
$hashFunctionName = null, $admin = null, $suspended = null,
$changePasswordAtNextLogin = null, $agreedToTerms = null)
public function __construct($username = null, $password = null,
$hashFunctionName = null, $admin = null, $suspended = null,
$changePasswordAtNextLogin = null, $agreedToTerms = null)
{
foreach (Zend_Gdata_Gapps::$namespaces as $nsPrefix => $nsUri) {
$this->registerNamespace($nsPrefix, $nsUri);
}
parent::__construct();
$this->registerAllNamespaces(Zend_Gdata_Gapps::$namespaces);
parent::__construct();
$this->_username = $username;
$this->_password = $password;
$this->_hashFunctionName = $hashFunctionName;
@ -144,13 +143,13 @@ class Zend_Gdata_Gapps_Extension_Login extends Zend_Gdata_Extension
}
/**
* Retrieves a DOMElement which corresponds to this element and all
* Retrieves a DOMElement which corresponds to this element and all
* child properties. This is used to build an entry back into a DOM
* and eventually XML text for sending to the server upon updates, or
* for application storage/persistence.
* for application storage/persistence.
*
* @param DOMDocument $doc The DOMDocument used to construct DOMElements
* @return DOMElement The DOMElement representing this element and all
* @return DOMElement The DOMElement representing this element and all
* child properties.
*/
public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
@ -177,13 +176,13 @@ class Zend_Gdata_Gapps_Extension_Login extends Zend_Gdata_Extension
if ($this->_changePasswordAtNextLogin !== null) {
$element->setAttribute('changePasswordAtNextLogin', ($this->_changePasswordAtNextLogin ? "true" : "false"));
}
return $element;
}
/**
* Given a DOMNode representing an attribute, tries to map the data into
* instance members. If no mapping is defined, the name and value are
* instance members. If no mapping is defined, the name and value are
* stored in an array.
*
* @param DOMNode $attribute The DOMNode attribute needed to be handled
@ -266,8 +265,8 @@ class Zend_Gdata_Gapps_Extension_Login extends Zend_Gdata_Extension
}
/**
* Set the value for this element's username attribute. This string
* is used to uniquely identify the user in this domian and is used
* Set the value for this element's username attribute. This string
* is used to uniquely identify the user in this domian and is used
* to form this user's email address.
*
* @param string $value The desired value for this attribute.
@ -278,7 +277,7 @@ class Zend_Gdata_Gapps_Extension_Login extends Zend_Gdata_Extension
$this->_username = $value;
return $this;
}
/**
* Get the value for this element's password attribute.
*
@ -291,9 +290,9 @@ class Zend_Gdata_Gapps_Extension_Login extends Zend_Gdata_Extension
}
/**
* Set the value for this element's password attribute. As of this
* writing, this can be either be provided as plaintext or hashed using
* the SHA-1 algorithm for protection. If using a hash function,
* Set the value for this element's password attribute. As of this
* writing, this can be either be provided as plaintext or hashed using
* the SHA-1 algorithm for protection. If using a hash function,
* this must be indicated by calling setHashFunctionName().
*
* @param string $value The desired value for this attribute.
@ -317,10 +316,10 @@ class Zend_Gdata_Gapps_Extension_Login extends Zend_Gdata_Extension
}
/**
* Set the value for this element's hashFunctionName attribute. This
* indicates whether the password supplied with setPassword() is in
* plaintext or has had a hash function applied to it. If null,
* plaintext is assumed. As of this writing, the only valid hash
* Set the value for this element's hashFunctionName attribute. This
* indicates whether the password supplied with setPassword() is in
* plaintext or has had a hash function applied to it. If null,
* plaintext is assumed. As of this writing, the only valid hash
* function is 'SHA-1'.
*
* @param string $value The desired value for this attribute.
@ -331,7 +330,7 @@ class Zend_Gdata_Gapps_Extension_Login extends Zend_Gdata_Extension
$this->_hashFunctionName = $value;
return $this;
}
/**
* Get the value for this element's admin attribute.
*
@ -349,7 +348,7 @@ class Zend_Gdata_Gapps_Extension_Login extends Zend_Gdata_Extension
}
/**
* Set the value for this element's admin attribute. This indicates
* Set the value for this element's admin attribute. This indicates
* whether this user is an administrator for this domain.
*
* @param boolean $value The desired value for this attribute.
@ -383,7 +382,7 @@ class Zend_Gdata_Gapps_Extension_Login extends Zend_Gdata_Extension
}
/**
* Set the value for this element's agreedToTerms attribute. This
* Set the value for this element's agreedToTerms attribute. This
* indicates whether this user has agreed to the terms of service.
*
* @param boolean $value The desired value for this attribute.
@ -417,7 +416,7 @@ class Zend_Gdata_Gapps_Extension_Login extends Zend_Gdata_Extension
}
/**
* Set the value for this element's suspended attribute. If true, the
* Set the value for this element's suspended attribute. If true, the
* user will not be able to login to this domain until unsuspended.
*
* @param boolean $value The desired value for this attribute.
@ -451,10 +450,10 @@ class Zend_Gdata_Gapps_Extension_Login extends Zend_Gdata_Extension
}
/**
* Set the value for this element's changePasswordAtNextLogin attribute.
* If true, the user will be forced to set a new password the next
* Set the value for this element's changePasswordAtNextLogin attribute.
* If true, the user will be forced to set a new password the next
* time they login.
*
*
* @param boolean $value The desired value for this attribute.
* @return Zend_Gdata_Gapps_Extension_Login Provides a fluent interface.
* @throws Zend_Gdata_App_InvalidArgumentException
@ -475,10 +474,10 @@ class Zend_Gdata_Gapps_Extension_Login extends Zend_Gdata_Extension
*/
public function __toString()
{
return "Username: " . $this->getUsername() .
"\nPassword: " . (is_null($this->getPassword()) ? "NOT SET" : "SET") .
"\nPassword Hash Function: " . $this->getHashFunctionName() .
"\nAdministrator: " . ($this->getAdmin() ? "Yes" : "No") .
return "Username: " . $this->getUsername() .
"\nPassword: " . (($this->getPassword() === null) ? "NOT SET" : "SET") .
"\nPassword Hash Function: " . $this->getHashFunctionName() .
"\nAdministrator: " . ($this->getAdmin() ? "Yes" : "No") .
"\nAgreed To Terms: " . ($this->getAgreedToTerms() ? "Yes" : "No") .
"\nSuspended: " . ($this->getSuspended() ? "Yes" : "No");
}

View File

@ -31,12 +31,13 @@ require_once 'Zend/Gdata/Extension.php';
require_once 'Zend/Gdata/Gapps.php';
/**
* Represents the apps:name element used by the Apps data API. This is used
* to represent a user's full name. This class is usually contained within
* Represents the apps:name element used by the Apps data API. This is used
* to represent a user's full name. This class is usually contained within
* instances of Zend_Gdata_Gapps_UserEntry.
*
* @category Zend
* @package Zend_Gdata
* @subpackage Gapps
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
@ -45,47 +46,45 @@ class Zend_Gdata_Gapps_Extension_Name extends Zend_Gdata_Extension
protected $_rootNamespace = 'apps';
protected $_rootElement = 'name';
/**
* The associated user's family name.
*
*
* @var string
*/
protected $_familyName = null;
/**
* The associated user's given name.
*
*
* @var string
*/
protected $_givenName = null;
/**
* Constructs a new Zend_Gdata_Gapps_Extension_Name object.
*
* @param string $familyName (optional) The familyName to be set for this
*
* @param string $familyName (optional) The familyName to be set for this
* object.
* @param string $givenName (optional) The givenName to be set for this
* @param string $givenName (optional) The givenName to be set for this
* object.
*/
public function __construct($familyName = null, $givenName = null)
public function __construct($familyName = null, $givenName = null)
{
foreach (Zend_Gdata_Gapps::$namespaces as $nsPrefix => $nsUri) {
$this->registerNamespace($nsPrefix, $nsUri);
}
parent::__construct();
$this->registerAllNamespaces(Zend_Gdata_Gapps::$namespaces);
parent::__construct();
$this->_familyName = $familyName;
$this->_givenName = $givenName;
}
/**
* Retrieves a DOMElement which corresponds to this element and all
* Retrieves a DOMElement which corresponds to this element and all
* child properties. This is used to build an entry back into a DOM
* and eventually XML text for sending to the server upon updates, or
* for application storage/persistence.
* for application storage/persistence.
*
* @param DOMDocument $doc The DOMDocument used to construct DOMElements
* @return DOMElement The DOMElement representing this element and all
* @return DOMElement The DOMElement representing this element and all
* child properties.
*/
public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
@ -102,7 +101,7 @@ class Zend_Gdata_Gapps_Extension_Name extends Zend_Gdata_Extension
/**
* Given a DOMNode representing an attribute, tries to map the data into
* instance members. If no mapping is defined, the name and value are
* instance members. If no mapping is defined, the name and value are
* stored in an array.
*
* @param DOMNode $attribute The DOMNode attribute needed to be handled
@ -133,7 +132,7 @@ class Zend_Gdata_Gapps_Extension_Name extends Zend_Gdata_Extension
}
/**
* Set the value for this element's familyName attribute. This
* Set the value for this element's familyName attribute. This
* represents a user's family name.
*
* @param string $value The desired value for this attribute.
@ -144,7 +143,7 @@ class Zend_Gdata_Gapps_Extension_Name extends Zend_Gdata_Extension
$this->_familyName = $value;
return $this;
}
/**
* Get the value for this element's givenName attribute.
*
@ -157,7 +156,7 @@ class Zend_Gdata_Gapps_Extension_Name extends Zend_Gdata_Extension
}
/**
* Set the value for this element's givenName attribute. This
* Set the value for this element's givenName attribute. This
* represents a user's given name.
*
* @param string $value The desired value for this attribute.

View File

@ -31,12 +31,13 @@ require_once 'Zend/Gdata/Extension.php';
require_once 'Zend/Gdata/Gapps.php';
/**
* Represents the apps:nickname element used by the Apps data API. This
* is used to describe a nickname's properties, and is usually contained
* Represents the apps:nickname element used by the Apps data API. This
* is used to describe a nickname's properties, and is usually contained
* within instances of Zend_Gdata_Gapps_NicknameEntry.
*
* @category Zend
* @package Zend_Gdata
* @subpackage Gapps
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
@ -45,11 +46,11 @@ class Zend_Gdata_Gapps_Extension_Nickname extends Zend_Gdata_Extension
protected $_rootNamespace = 'apps';
protected $_rootElement = 'nickname';
/**
* The name of the nickname. This name is used as the email address
* The name of the nickname. This name is used as the email address
* for this nickname.
*
*
* @var string
*/
protected $_name = null;
@ -58,23 +59,21 @@ class Zend_Gdata_Gapps_Extension_Nickname extends Zend_Gdata_Extension
* Constructs a new Zend_Gdata_Gapps_Extension_Nickname object.
* @param string $name (optional) The nickname being represented.
*/
public function __construct($name = null)
public function __construct($name = null)
{
foreach (Zend_Gdata_Gapps::$namespaces as $nsPrefix => $nsUri) {
$this->registerNamespace($nsPrefix, $nsUri);
}
parent::__construct();
$this->_name = $name;
$this->registerAllNamespaces(Zend_Gdata_Gapps::$namespaces);
parent::__construct();
$this->_name = $name;
}
/**
* Retrieves a DOMElement which corresponds to this element and all
* Retrieves a DOMElement which corresponds to this element and all
* child properties. This is used to build an entry back into a DOM
* and eventually XML text for sending to the server upon updates, or
* for application storage/persistence.
* for application storage/persistence.
*
* @param DOMDocument $doc The DOMDocument used to construct DOMElements
* @return DOMElement The DOMElement representing this element and all
* @return DOMElement The DOMElement representing this element and all
* child properties.
*/
public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
@ -88,7 +87,7 @@ class Zend_Gdata_Gapps_Extension_Nickname extends Zend_Gdata_Extension
/**
* Given a DOMNode representing an attribute, tries to map the data into
* instance members. If no mapping is defined, the name and value are
* instance members. If no mapping is defined, the name and value are
* stored in an array.
*
* @param DOMNode $attribute The DOMNode attribute needed to be handled
@ -116,12 +115,12 @@ class Zend_Gdata_Gapps_Extension_Nickname extends Zend_Gdata_Extension
}
/**
* Set the value for this element's name attribute. This name uniquely
* Set the value for this element's name attribute. This name uniquely
* describes this nickname within the domain. Emails addressed to this
* name will be delivered to the user who owns this nickname.
*
* @param string $value The desired value for this attribute.
* @return Zend_Gdata_Gapps_Extension_Nickname Provides a fluent
* @return Zend_Gdata_Gapps_Extension_Nickname Provides a fluent
* interface.
*/
public function setName($value)

View File

@ -31,13 +31,14 @@ require_once 'Zend/Gdata/Extension.php';
require_once 'Zend/Gdata/Gapps.php';
/**
* Represents the apps:quota element used by the Apps data API. This is
* used to indicate the amount of storage space available to a user. Quotas
* may not be able to be set, depending on the domain used. This class
* Represents the apps:quota element used by the Apps data API. This is
* used to indicate the amount of storage space available to a user. Quotas
* may not be able to be set, depending on the domain used. This class
* is usually contained within an instance of Zend_Gdata_Gapps_UserEntry.
*
* @category Zend
* @package Zend_Gdata
* @subpackage Gapps
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
@ -46,36 +47,34 @@ class Zend_Gdata_Gapps_Extension_Quota extends Zend_Gdata_Extension
protected $_rootNamespace = 'apps';
protected $_rootElement = 'quota';
/**
* The amount of storage space available to the user in megabytes.
*
*
* @var integer
*/
protected $_limit = null;
/**
* Constructs a new Zend_Gdata_Gapps_Extension_Quota object.
*
*
* @param string $limit (optional) The limit, in bytes, for this quota.
*/
public function __construct($limit = null)
public function __construct($limit = null)
{
foreach (Zend_Gdata_Gapps::$namespaces as $nsPrefix => $nsUri) {
$this->registerNamespace($nsPrefix, $nsUri);
}
parent::__construct();
$this->_limit = $limit;
$this->registerAllNamespaces(Zend_Gdata_Gapps::$namespaces);
parent::__construct();
$this->_limit = $limit;
}
/**
* Retrieves a DOMElement which corresponds to this element and all
* Retrieves a DOMElement which corresponds to this element and all
* child properties. This is used to build an entry back into a DOM
* and eventually XML text for sending to the server upon updates, or
* for application storage/persistence.
* for application storage/persistence.
*
* @param DOMDocument $doc The DOMDocument used to construct DOMElements
* @return DOMElement The DOMElement representing this element and all
* @return DOMElement The DOMElement representing this element and all
* child properties.
*/
public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
@ -89,7 +88,7 @@ class Zend_Gdata_Gapps_Extension_Quota extends Zend_Gdata_Extension
/**
* Given a DOMNode representing an attribute, tries to map the data into
* instance members. If no mapping is defined, the name and value are
* instance members. If no mapping is defined, the name and value are
* stored in an array.
*
* @param DOMNode $attribute The DOMNode attribute needed to be handled
@ -117,8 +116,8 @@ class Zend_Gdata_Gapps_Extension_Quota extends Zend_Gdata_Extension
}
/**
* Set the value for this element's limit attribute. This is the amount
* of storage space, in bytes, that should be made available to
* Set the value for this element's limit attribute. This is the amount
* of storage space, in bytes, that should be made available to
* the associated user.
*
* @param string $value The desired value for this attribute.

View File

@ -37,13 +37,13 @@ require_once 'Zend/Gdata/Gapps/Extension/Nickname.php';
/**
* Data model class for a Google Apps Nickname Entry.
*
* Each nickname entry describes a single nickname within a Google Apps
* hosted domain. Each user may own several nicknames, but each nickname may
* only belong to one user. Multiple entries are contained within instances
*
* Each nickname entry describes a single nickname within a Google Apps
* hosted domain. Each user may own several nicknames, but each nickname may
* only belong to one user. Multiple entries are contained within instances
* of Zend_Gdata_Gapps_NicknameFeed.
*
* To transfer nickname entries to and from the Google Apps servers,
*
* To transfer nickname entries to and from the Google Apps servers,
* including creating new entries, refer to the Google Apps service class,
* Zend_Gdata_Gapps.
*
@ -51,6 +51,7 @@ require_once 'Zend/Gdata/Gapps/Extension/Nickname.php';
*
* @category Zend
* @package Zend_Gdata
* @subpackage Gapps
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
@ -60,31 +61,29 @@ class Zend_Gdata_Gapps_NicknameEntry extends Zend_Gdata_Entry
protected $_entryClassName = 'Zend_Gdata_Gapps_NicknameEntry';
/**
* <apps:login> element used to hold information about the owner
* <apps:login> element used to hold information about the owner
* of this nickname, including their username.
*
*
* @var Zend_Gdata_Gapps_Extension_Login
*/
protected $_login = null;
/**
* <apps:nickname> element used to hold the name of this nickname.
*
*
* @var Zend_Gdata_Gapps_Extension_Nickname
*/
protected $_nickname = null;
/**
* Create a new instance.
*
*
* @param DOMElement $element (optional) DOMElement from which this
* object should be constructed.
*/
public function __construct($element = null)
{
foreach (Zend_Gdata_Gapps::$namespaces as $nsPrefix => $nsUri) {
$this->registerNamespace($nsPrefix, $nsUri);
}
$this->registerAllNamespaces(Zend_Gdata_Gapps::$namespaces);
parent::__construct($element);
}
@ -108,7 +107,7 @@ class Zend_Gdata_Gapps_NicknameEntry extends Zend_Gdata_Entry
}
return $element;
}
/**
* Creates individual Entry objects of the appropriate type and
* stores them as members of this entry based upon DOM data.
@ -118,14 +117,14 @@ class Zend_Gdata_Gapps_NicknameEntry extends Zend_Gdata_Entry
protected function takeChildFromDOM($child)
{
$absoluteNodeName = $child->namespaceURI . ':' . $child->localName;
switch ($absoluteNodeName) {
case $this->lookupNamespace('apps') . ':' . 'login';
case $this->lookupNamespace('apps') . ':' . 'login';
$login = new Zend_Gdata_Gapps_Extension_Login();
$login->transferFromDOM($child);
$this->_login = $login;
break;
case $this->lookupNamespace('apps') . ':' . 'nickname';
case $this->lookupNamespace('apps') . ':' . 'nickname';
$nickname = new Zend_Gdata_Gapps_Extension_Nickname();
$nickname->transferFromDOM($child);
$this->_nickname = $nickname;
@ -148,10 +147,10 @@ class Zend_Gdata_Gapps_NicknameEntry extends Zend_Gdata_Entry
}
/**
* Set the value of the login property for this object. This property
* Set the value of the login property for this object. This property
* is used to store the username address of the current user.
*
* @param Zend_Gdata_Gapps_Extension_Login $value The desired value for
*
* @param Zend_Gdata_Gapps_Extension_Login $value The desired value for
* this instance's login property.
* @return Zend_Gdata_Gapps_NicknameEntry Provides a fluent interface.
*/
@ -173,10 +172,10 @@ class Zend_Gdata_Gapps_NicknameEntry extends Zend_Gdata_Entry
}
/**
* Set the value of the nickname property for this object. This property
* Set the value of the nickname property for this object. This property
* is used to store the the name of the current nickname.
*
* @param Zend_Gdata_Gapps_Extension_Nickname $value The desired value for
*
* @param Zend_Gdata_Gapps_Extension_Nickname $value The desired value for
* this instance's nickname property.
* @return Zend_Gdata_Gapps_NicknameEntry Provides a fluent interface.
*/

View File

@ -39,6 +39,7 @@ require_once 'Zend/Gdata/Gapps/NicknameEntry.php';
*
* @category Zend
* @package Zend_Gdata
* @subpackage Gapps
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/

View File

@ -35,6 +35,7 @@ require_once('Zend/Gdata/Gapps/Query.php');
*
* @category Zend
* @package Zend_Gdata
* @subpackage Gapps
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/

View File

@ -39,6 +39,7 @@ require_once('Zend/Gdata/Gapps.php');
*
* @category Zend
* @package Zend_Gdata
* @subpackage Gapps
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/

View File

@ -41,6 +41,7 @@ require_once 'Zend/Gdata/Gapps/Error.php';
*
* @category Zend
* @package Zend_Gdata
* @subpackage Gapps
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/

View File

@ -47,11 +47,11 @@ require_once 'Zend/Gdata/Gapps/Extension/Quota.php';
/**
* Data model class for a Google Apps User Entry.
*
* Each user entry describes a single user within a Google Apps hosted
*
* Each user entry describes a single user within a Google Apps hosted
* domain.
*
* To transfer user entries to and from the Google Apps servers, including
*
* To transfer user entries to and from the Google Apps servers, including
* creating new entries, refer to the Google Apps service class,
* Zend_Gdata_Gapps.
*
@ -59,6 +59,7 @@ require_once 'Zend/Gdata/Gapps/Extension/Quota.php';
*
* @category Zend
* @package Zend_Gdata
* @subpackage Gapps
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
@ -66,49 +67,47 @@ class Zend_Gdata_Gapps_UserEntry extends Zend_Gdata_Entry
{
protected $_entryClassName = 'Zend_Gdata_Gapps_UserEntry';
/**
* <apps:login> element containing information about this user's
* <apps:login> element containing information about this user's
* account, including their username and permissions.
*
*
* @var Zend_Gdata_Gapps_Extension_Login
*/
protected $_login = null;
/**
* <apps:name> element containing the user's actual name.
*
*
* @var Zend_Gdata_Gapps_Extension_Name
*/
protected $_name = null;
/**
* <apps:quotq> element describing any storage quotas in place for
* this user.
*
* <apps:quotq> element describing any storage quotas in place for
* this user.
*
* @var Zend_Gdata_Gapps_Extension_Quota
*/
protected $_quota = null;
/**
* <gd:feedLink> element containing information about other feeds
* <gd:feedLink> element containing information about other feeds
* relevant to this entry.
*
*
* @var Zend_Gdata_Extension_FeedLink
*/
protected $_feedLink = array();
/**
* Create a new instance.
*
*
* @param DOMElement $element (optional) DOMElement from which this
* object should be constructed.
*/
public function __construct($element = null)
{
foreach (Zend_Gdata_Gapps::$namespaces as $nsPrefix => $nsUri) {
$this->registerNamespace($nsPrefix, $nsUri);
}
$this->registerAllNamespaces(Zend_Gdata_Gapps::$namespaces);
parent::__construct($element);
}
@ -148,24 +147,24 @@ class Zend_Gdata_Gapps_UserEntry extends Zend_Gdata_Entry
protected function takeChildFromDOM($child)
{
$absoluteNodeName = $child->namespaceURI . ':' . $child->localName;
switch ($absoluteNodeName) {
case $this->lookupNamespace('apps') . ':' . 'login';
case $this->lookupNamespace('apps') . ':' . 'login';
$login = new Zend_Gdata_Gapps_Extension_Login();
$login->transferFromDOM($child);
$this->_login = $login;
break;
case $this->lookupNamespace('apps') . ':' . 'name';
case $this->lookupNamespace('apps') . ':' . 'name';
$name = new Zend_Gdata_Gapps_Extension_Name();
$name->transferFromDOM($child);
$this->_name = $name;
break;
case $this->lookupNamespace('apps') . ':' . 'quota';
case $this->lookupNamespace('apps') . ':' . 'quota';
$quota = new Zend_Gdata_Gapps_Extension_Quota();
$quota->transferFromDOM($child);
$this->_quota = $quota;
break;
case $this->lookupNamespace('gd') . ':' . 'feedLink';
case $this->lookupNamespace('gd') . ':' . 'feedLink';
$feedLink = new Zend_Gdata_Extension_FeedLink();
$feedLink->transferFromDOM($child);
$this->_feedLink[] = $feedLink;
@ -188,10 +187,10 @@ class Zend_Gdata_Gapps_UserEntry extends Zend_Gdata_Entry
}
/**
* Set the value of the login property for this object. This property
* Set the value of the login property for this object. This property
* is used to store the username address of the current user.
*
* @param Zend_Gdata_Gapps_Extension_Login $value The desired value for
*
* @param Zend_Gdata_Gapps_Extension_Login $value The desired value for
* this instance's login property.
* @return Zend_Gdata_Gapps_UserEntry Provides a fluent interface.
*/
@ -213,10 +212,10 @@ class Zend_Gdata_Gapps_UserEntry extends Zend_Gdata_Entry
}
/**
* Set the value of the name property for this object. This property
* Set the value of the name property for this object. This property
* is used to store the full name of the current user.
*
* @param Zend_Gdata_Gapps_Extension_Name $value The desired value for
*
* @param Zend_Gdata_Gapps_Extension_Name $value The desired value for
* this instance's name property.
* @return Zend_Gdata_Gapps_UserEntry Provides a fluent interface.
*/
@ -238,11 +237,11 @@ class Zend_Gdata_Gapps_UserEntry extends Zend_Gdata_Entry
}
/**
* Set the value of the quota property for this object. This property
* is used to store the amount of storage available for the current
* Set the value of the quota property for this object. This property
* is used to store the amount of storage available for the current
* user. Quotas may not be modifiable depending on the domain used.
*
* @param Zend_Gdata_Gapps_Extension_Quota $value The desired value for
*
* @param Zend_Gdata_Gapps_Extension_Quota $value The desired value for
* this instance's quota property.
* @return Zend_Gdata_Gapps_UserEntry Provides a fluent interface.
*/
@ -251,17 +250,17 @@ class Zend_Gdata_Gapps_UserEntry extends Zend_Gdata_Entry
$this->_quota = $value;
return $this;
}
/**
* Returns all feed links for this entry, or if a rel value is
* Returns all feed links for this entry, or if a rel value is
* specified, the feed link associated with that value is returned.
*
* @param string $rel The rel value of the link to be found. If null,
*
* @param string $rel The rel value of the link to be found. If null,
* the array of links is returned instead.
* @return mixed Either an array of Zend_Gdata_Extension_FeedLink
* objects if $rel is null, a single
* Zend_Gdata_Extension_FeedLink object if $rel is specified
* and a matching feed link is found, or null if $rel is
* @return mixed Either an array of Zend_Gdata_Extension_FeedLink
* objects if $rel is null, a single
* Zend_Gdata_Extension_FeedLink object if $rel is specified
* and a matching feed link is found, or null if $rel is
* specified and no matching feed link is found.
*/
public function getFeedLink($rel = null)
@ -279,10 +278,10 @@ class Zend_Gdata_Gapps_UserEntry extends Zend_Gdata_Entry
}
/**
* Set the value of the feed link property for this object. This property
* Set the value of the feed link property for this object. This property
* is used to provide links to alternative feeds relevant to this entry.
*
* @param array $value A collection of
*
* @param array $value A collection of
* Zend_Gdata_Gapps_Extension_FeedLink objects.
* @return Zend_Gdata_Gapps_EventEntry Provides a fluent interface.
*/
@ -291,5 +290,5 @@ class Zend_Gdata_Gapps_UserEntry extends Zend_Gdata_Entry
$this->_feedLink = $value;
return $this;
}
}

View File

@ -39,6 +39,7 @@ require_once 'Zend/Gdata/Gapps/UserEntry.php';
*
* @category Zend
* @package Zend_Gdata
* @subpackage Gapps
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/

View File

@ -35,6 +35,7 @@ require_once('Zend/Gdata/Gapps/Query.php');
*
* @category Zend
* @package Zend_Gdata
* @subpackage Gapps
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/