Gdata Gapps Error class. This class is used to represent errors returned within an AppsForYourDomainErrors message received from the Google Apps servers.

Several different errors may be represented by this class, determined by the error code returned by the server. For a list of error codes available at the time of this writing, see getErrorCode.

category Zend
package Zend_Gdata
subpackage Gapps
copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
license New BSD License
inherited_from \Zend_Gdata_App_Base

 Methods

__construct()

__construct($errorCode = null, $reason = null, $invalidInput = null
inherited_from \Zend_Gdata_App_Base::__construct()

Parameters

$errorCode

$reason

$invalidInput

__construct()

__construct() 
Inherited

Magic getter to allow access like $entry->foo to call $entry->getFoo() Alternatively, if no getFoo() is defined, but a $_foo protected variable is defined, this is returned.

__get(string $name) 
Inherited

TODO Remove ability to bypass getFoo() methods??

Parameters

$name

string

The variable name sought

Magic __isset method

__isset(string $name) 
Inherited

Parameters

$name

string

Magic setter to allow acces like $entry->foo='bar' to call $entry->setFoo('bar') automatically.

__set(string $name, $val) 
Inherited

Alternatively, if no setFoo() is defined, but a $_foo protected variable is defined, this is returned.

TODO Remove ability to bypass getFoo() methods??

Parameters

$name

string

$val

Get a human readable version of this exception.

__toString() : string
inherited_from \Zend_Gdata_App_Base::__toString()

Returns

string

Magic toString method allows using this directly via echo Works best in PHP >= 4.2.0

__toString() : string
Inherited

Returns

stringThe text representation of this object

Magic __unset method

__unset(string $name) 
Inherited

Parameters

$name

string

Alias for saveXML()

encode() : string
Inherited

Can be overridden by children to provide more complex representations of entries.

Returns

stringEncoded string content

Flush namespace lookup cache.

flushNamespaceLookupCache() 
InheritedStatic

Empties the namespace lookup cache. Call this function if you have added data to the namespace lookup table that contradicts values that may have been cached during a previous call to lookupNamespace().

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 application storage/persistence.

getDOM(\DOMDocument $doc = null, $majorVersion = 1, $minorVersion = null) : \DOMElement
inherited_from \Zend_Gdata_App_Base::getDOM()

Parameters

$doc

\DOMDocument

The DOMDocument used to construct DOMElements

$majorVersion

$minorVersion

Returns

\DOMElementThe DOMElement representing this element and all child properties.

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.

getDOM(\DOMDocument $doc = null, $majorVersion = 1, $minorVersion = null) : \DOMElement
Inherited

Parameters

$doc

\DOMDocument

The DOMDocument used to construct DOMElements

$majorVersion

$minorVersion

Returns

\DOMElementThe DOMElement representing this element and all child properties.

Get the error code for this exception. Currently valid values are available as constants within this class. These values are:

getErrorCode() : integer

UNKNOWN_ERROR (1000) USER_DELETED_RECENTLY (1100) USER_SUSPENDED (1101) DOMAIN_USER_LIMIT_EXCEEDED (1200) DOMAIN_ALIAS_LIMIT_EXCEEDED (1201) DOMAIN_SUSPENDED (1202) DOMAIN_FEATURE_UNAVAILABLE (1203) ENTITY_EXISTS (1300) ENTITY_DOES_NOT_EXIST (1301) ENTITY_NAME_IS_RESERVED (1302) ENTITY_NAME_NOT_VALID (1303) INVALID_GIVEN_NAME (1400) INVALID_FAMILY_NAME (1401) INVALID_PASSWORD (1402) INVALID_USERNAME (1403) INVALID_HASH_FUNCTION_NAME (1404) INVALID_HASH_DIGEST_LENGTH (1405) INVALID_EMAIL_ADDRESS (1406) INVALID_QUERY_PARAMETER_VALUE (1407) TOO_MANY_RECIPIENTS_ON_EMAIL_LIST (1500)

Numbers in parenthesis indicate the actual integer value of the constant. This list should not be treated as exhaustive, as additional error codes may be added at any time.

For more information about these codes and their meaning, please see Appendix D of the Google Apps Provisioning API Reference.

link Google Apps Provisioning API Reference: Appendix D - Gdata Error Codes
see

Returns

integerThe error code returned by the Google Apps server.

Returns an array of all extension attributes not transformed into data model properties during parsing of the XML. Each element of the array is a hashed array of the format: array('namespaceUri' => string, 'name' => string, 'value' => string);

getExtensionAttributes() : array
Inherited

Returns

arrayAll extension attributes

Returns an array of all elements not matched to data model classes during the parsing of the XML

getExtensionElements() : array
Inherited

Returns

arrayAll elements not matched to data model classes during parsing

Set the invalid input which caused this exception.

getInvalidInput() : string
see

Returns

stringThe reason this exception occurred.

Get human-readable text describing the reason this exception occurred.

getReason() : string
see

Returns

stringThe reason this exception occurred.

Returns the child text node of this element This represents any raw text contained within the XML element

getText($trim = true) : string
Inherited

Parameters

$trim

Returns

stringChild text node

Alias for saveXML() returns XML content for this element and all children

getXML() : string
Inherited

Returns

stringXML content

Get the full version of a namespace prefix

lookupNamespace(string $prefix, integer $majorVersion = 1, integer $minorVersion = null) : string
Inherited

Looks up a prefix (atom:, etc.) in the list of registered namespaces and returns the full namespace URI if available. Returns the prefix, unmodified, if it's not registered.

Parameters

$prefix

string

The namespace prefix to lookup.

$majorVersion

integer

The major protocol version in effect. Defaults to '1'.

$minorVersion

integer

The minor protocol version in effect. Defaults to null (use latest).

Returns

string

Add an array of namespaces to the registered list.

registerAllNamespaces(array $namespaceArray) : void
Inherited

Takes an array in the format of: namespace prefix, namespace URI, major protocol version, minor protocol version and adds them with calls to ->registerNamespace()

Parameters

$namespaceArray

array

An array of namespaces.

Add a namespace and prefix to the registered list

registerNamespace(string $prefix, string $namespaceUri, integer $majorVersion = 1, integer $minorVersion = 0) : void
Inherited

Takes a prefix and a full namespace URI and adds them to the list of registered namespaces for use by $this->lookupNamespace().

WARNING: Currently, registering a namespace will NOT invalidate any memoized data stored in $_namespaceLookupCache. Under normal use, this behavior is acceptable. If you are adding contradictory data to the namespace lookup table, you must call flushNamespaceLookupCache().

Parameters

$prefix

string

The namespace prefix

$namespaceUri

string

The full namespace URI

$majorVersion

integer

The major protocol version in effect. Defaults to '1'.

$minorVersion

integer

The minor protocol version in effect. Defaults to null (use latest).

Converts this element and all children into XML text using getDOM()

saveXML() : string
Inherited

Returns

stringXML content

Set the error code for this exception. For more information about error codes, see getErrorCode.

setErrorCode(integer $value) 
see

Parameters

$value

integer

The new value for the error code.

Sets an array of all extension attributes not transformed into data model properties during parsing of the XML. Each element of the array is a hashed array of the format: array('namespaceUri' => string, 'name' => string, 'value' => string); This can be used to add arbitrary attributes to any data model element

setExtensionAttributes(array $value) : \Zend_Gdata_App_Base
Inherited

Parameters

$value

array

All extension attributes

Returns

\Zend_Gdata_App_BaseReturns an object of the same type as 'this' to provide a fluent interface.

Sets an array of all elements not matched to data model classes during the parsing of the XML. This method can be used to add arbitrary child XML elements to any data model class.

setExtensionElements(array $value) : \Zend_Gdata_App_Base
Inherited

Parameters

$value

array

All extension elements

Returns

\Zend_Gdata_App_BaseReturns an object of the same type as 'this' to provide a fluent interface.

Set the invalid input which caused this exception.

setInvalidInput(string $value) 
see

Parameters

$value

string

The invalid input that triggered this exception.

Set human-readable text describing the reason this exception occurred.

setReason(string $value) 
see

Parameters

$value

string

The reason this exception occurred.

Sets the child text node of this element This represents any raw text contained within the XML element

setText(string $value) : \Zend_Gdata_App_Base
Inherited

Parameters

$value

string

Child text node

Returns

\Zend_Gdata_App_BaseReturns an object of the same type as 'this' to provide a fluent interface.

Transfers each child and attribute into member variables.

transferFromDOM(\DOMNode $node) 
Inherited

This is called when XML is received over the wire and the data model needs to be built to represent this XML.

Parameters

$node

\DOMNode

The DOMNode that represents this object's data

Parses the provided XML text and generates data model classes for each know element by turning the XML text into a DOM tree and calling transferFromDOM($element). The first data model element with the same name as $this->_rootElement is used and the child elements are recursively parsed.

transferFromXML(string $xml) 
Inherited

Parameters

$xml

string

The XML text to parse

Given a DOMNode representing an attribute, tries to map the data into instance members. If no mapping is defined, the name and value are stored in an array.

takeAttributeFromDOM(\DOMNode $attribute) 
inherited_from \Zend_Gdata_App_Base::takeAttributeFromDOM()

Parameters

$attribute

\DOMNode

The DOMNode attribute needed to be handled

Given a DOMNode representing an attribute, tries to map the data into instance members. If no mapping is defined, the name and value are stored in an array.

takeAttributeFromDOM(\DOMNode $attribute) 
Inherited

Parameters

$attribute

\DOMNode

The DOMNode attribute needed to be handled

Given a child DOMNode, tries to determine how to map the data into object instance members. If no mapping is defined, Extension_Element objects are created and stored in an array.

takeChildFromDOM(\DOMNode $child) 
Inherited

Parameters

$child

\DOMNode

The DOMNode needed to be handled

 Properties

 

$_errorCode

$_errorCode 

Default

null
 

Leftover attributes which were not handled

$_extensionAttributes : array

Default

array()
 

Leftover elements which were not handled

$_extensionElements : array

Default

array()
 

$_invalidInput

$_invalidInput 

Default

null
 

Memoized results from calls to lookupNamespace() to avoid expensive calls to getGreatestBoundedValue(). The key is in the form 'prefix-majorVersion-minorVersion', and the value is the output from getGreatestBoundedValue().

$_namespaceLookupCache : array

Default

array()
Static
 

List of namespaces, as a three-dimensional array. The first dimension represents the namespace prefix, the second dimension represents the minimum major protocol version, and the third dimension is the minimum minor protocol version. Null keys are NOT allowed.

$_namespaces : array

Default

array('atom' => array(1 => array(0 => 'http://www.w3.org/2005/Atom')), 'app' => array(1 => array(0 => 'http://purl.org/atom/app#'), 2 => array(0 => 'http://www.w3.org/2007/app')))

When looking up a namespace for a given prefix, the greatest version number (both major and minor) which is less than the effective version should be used.

see
see
see
 

$_reason

$_reason 

Default

null
 

The XML element name, including prefix if desired

$_rootElement : string

Default

null
 

The XML namespace prefix

$_rootNamespace : string

Default

'atom'
 

The XML namespace URI - takes precedence over lookup up the corresponding URI for $_rootNamespace

$_rootNamespaceURI : string

Default

null
 

XML child text node content

$_text : string

Default

null

 Constants

 

DOMAIN_ALIAS_LIMIT_EXCEEDED

DOMAIN_ALIAS_LIMIT_EXCEEDED = 1201 
 

DOMAIN_FEATURE_UNAVAILABLE

DOMAIN_FEATURE_UNAVAILABLE = 1203 
 

DOMAIN_SUSPENDED

DOMAIN_SUSPENDED = 1202 
 

DOMAIN_USER_LIMIT_EXCEEDED

DOMAIN_USER_LIMIT_EXCEEDED = 1200 
 

ENTITY_DOES_NOT_EXIST

ENTITY_DOES_NOT_EXIST = 1301 
 

ENTITY_EXISTS

ENTITY_EXISTS = 1300 
 

ENTITY_NAME_IS_RESERVED

ENTITY_NAME_IS_RESERVED = 1302 
 

ENTITY_NAME_NOT_VALID

ENTITY_NAME_NOT_VALID = 1303 
 

INVALID_EMAIL_ADDRESS

INVALID_EMAIL_ADDRESS = 1406 
 

INVALID_FAMILY_NAME

INVALID_FAMILY_NAME = 1401 
 

INVALID_GIVEN_NAME

INVALID_GIVEN_NAME = 1400 
 

INVALID_HASH_DIGEST_LENGTH

INVALID_HASH_DIGEST_LENGTH = 1405 
 

INVALID_HASH_FUNCTION_NAME

INVALID_HASH_FUNCTION_NAME = 1404 
 

INVALID_PASSWORD

INVALID_PASSWORD = 1402 
 

INVALID_QUERY_PARAMETER_VALUE

INVALID_QUERY_PARAMETER_VALUE = 1407 
 

INVALID_USERNAME

INVALID_USERNAME = 1403 
 

TOO_MANY_RECIPIENTS_ON_EMAIL_LIST

TOO_MANY_RECIPIENTS_ON_EMAIL_LIST = 1500 
 

UNKNOWN_ERROR

UNKNOWN_ERROR = 1000 
 

USER_DELETED_RECENTLY

USER_DELETED_RECENTLY = 1100 
 

USER_SUSPENDED

USER_SUSPENDED = 1101