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

@ -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.