Gdata/App/FeedEntryParent.php
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-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Gdata
- Subpackage
- App
- Version
- $Id: FeedEntryParent.php 24593 2012-01-05 20:35:02Z matthew $
\Zend_Gdata_App_FeedEntryParent
Abstract class for common functionality in entries and feeds
- Parent(s)
- \Zend_Gdata_App_Base
- Children
- \Zend_Gdata_App_FeedSourceParent
- \Zend_Gdata_App_Entry
- Category
- Zend
- Copyright
- Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Properties

string|null $_etag = NULLThe HTTP ETag associated with this entry.
Used for optimistic concurrency in protoco v2 or greater.
NULLDetails- Type
- string | null

array $_extensionAttributes = array()array()Details- Type
- array
- Inherited_from
- \Zend_Gdata_App_Base::$$_extensionAttributes

array $_extensionElements = array()array()Details- Type
- array
- Inherited_from
- \Zend_Gdata_App_Base::$$_extensionElements

$_majorProtocolVersion = 1Indicates the major protocol version that should be used.
At present, recognized values are either 1 or 2. However, any integer value >= 1 is considered valid.
1Details- Type
- n/a
- See
- \global\setMajorProtocolVersion()
- See
- \global\getMajorProtocolVersion()

$_minorProtocolVersion = nullIndicates the minor protocol version that should be used.
Can be set to either an integer >= 0, or NULL if no minor version should be sent to the server.
nullDetails- Type
- n/a
- See
- \global\setMinorProtocolVersion()
- See
- \global\getMinorProtocolVersion()

array $_namespaceLookupCache = array()array()Details- Type
- array
- Inherited_from
- \Zend_Gdata_App_Base::$$_namespaceLookupCache

array $_namespaces = 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')))List of namespaces, as a three-dimensional array.
Inherited from: \Zend_Gdata_App_Base::$$_namespacesThe 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.
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.
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')))Details- Type
- array
- Inherited_from
- \Zend_Gdata_App_Base::$$_namespaces
- See
- \global\lookupNamespace()
- See
- \global\registerNamespace()
- See
- \global\registerAllNamespaces()

string $_rootElement = nullnullDetails- Type
- string
- Inherited_from
- \Zend_Gdata_App_Base::$$_rootElement

string $_rootNamespace = 'atom''atom'Details- Type
- string
- Inherited_from
- \Zend_Gdata_App_Base::$$_rootNamespace

string $_rootNamespaceURI = nullnullDetails- Type
- string
- Inherited_from
- \Zend_Gdata_App_Base::$$_rootNamespaceURI

$_service = nullService instance used to make network requests.
nullDetails- Type
- n/a
- See
- \global\setService(),

string $_text = nullnullDetails- Type
- string
- Inherited_from
- \Zend_Gdata_App_Base::$$_text
Methods

__construct( $element = null) : voidConstructs a Feed or Entry
| Name | Type | Description |
|---|---|---|
| $element |

__get(string $name) : voidMagic 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.
Inherited from: \Zend_Gdata_App_Base::__get()TODO Remove ability to bypass getFoo() methods??
| Name | Type | Description |
|---|---|---|
| $name | string | The variable name sought |

__set(string $name, $val) : voidMagic setter to allow acces like $entry->foo='bar' to call $entry->setFoo('bar') automatically.
Inherited from: \Zend_Gdata_App_Base::__set()Alternatively, if no setFoo() is defined, but a $_foo protected variable is defined, this is returned.
TODO Remove ability to bypass getFoo() methods??
| Name | Type | Description |
|---|---|---|
| $name | string | |
| $val |

__toString() : stringMagic toString method allows using this directly via echo Works best in PHP >= 4.2.0
Inherited from: \Zend_Gdata_App_Base::__toString()| Type | Description |
|---|---|
| string | The text representation of this object |

encode() : string
Can be overridden by children to provide more complex representations of entries.
| Type | Description |
|---|---|
| string | Encoded string content |

flushNamespaceLookupCache() : voidFlush namespace lookup cache.
Inherited from: \Zend_Gdata_App_Base::flushNamespaceLookupCache()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().

getAlternateLink() : \Zend_Gdata_App_Extension_LinkReturns the Zend_Gdata_App_Extension_Link element which represents the URL for an alternate view of the data represented by this feed or entry.
This alternate view is commonly a user-facing webpage, blog post, etc. The MIME type for the data at the URL is available from the returned Zend_Gdata_App_Extension_Link element. This link is in the atom feed/entry as an atom:link with a rel attribute value of 'self'.
| Type | Description |
|---|---|
| \Zend_Gdata_App_Extension_Link | The link, or null if not found |

getAuthor() : \Zend_Gdata_App_Extension_Author| Type | Description |
|---|---|
| \Zend_Gdata_App_Extension_Author |

getCategory() : arrayReturns the array of categories that classify this feed/entry.
Each category is represented in an atom feed by an atom:category element.
| Type | Description |
|---|---|
| array | Array of Zend_Gdata_App_Extension_Category |

getContributor() : arrayReturns the array of contributors to this feed/entry.
Each contributor is represented in an atom feed by an atom:contributor XML element
| Type | Description |
|---|---|
| array | An array of Zend_Gdata_App_Extension_Contributor |

getDOM(\DOMDocument $doc = null, $majorVersion = 1, $minorVersion = null) : \DOMElementRetrieves 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.
| Name | Type | Description |
|---|---|---|
| $doc | \DOMDocument | The DOMDocument used to construct DOMElements |
| $majorVersion | ||
| $minorVersion |
| Type | Description |
|---|---|
| \DOMElement | The DOMElement representing this element and all child properties. |

getEditLink() : \Zend_Gdata_App_Extension_LinkReturns the Zend_Gdata_App_Extension_Link element which represents the URL used to edit this resource.
This link is in the atom feed/entry as an atom:link with a rel attribute value of 'edit'.
| Type | Description |
|---|---|
| \Zend_Gdata_App_Extension_Link | The link, or null if not found |

getEtag() : string | nullReturn the Etag for the current entry, or null if not set.
| Type | Description |
|---|---|
| string | null |

getExtensionAttributes() : arrayReturns an array of all extension attributes not transformed into data model properties during parsing of the XML.
Inherited from: \Zend_Gdata_App_Base::getExtensionAttributes()Each element of the array is a hashed array of the format: array('namespaceUri' => string, 'name' => string, 'value' => string);
| Type | Description |
|---|---|
| array | All extension attributes |

getExtensionElements() : arrayReturns an array of all elements not matched to data model classes during the parsing of the XML
Inherited from: \Zend_Gdata_App_Base::getExtensionElements()| Type | Description |
|---|---|
| array | All elements not matched to data model classes during parsing |

getHttpClient() : \Zend_Http_Client_AbstractGets the HTTP client object.
If none is set, a new Zend_Http_Client will be used.
| Type | Description |
|---|---|
| \Zend_Http_Client_Abstract |
- Deprecated
- Deprecated as of Zend Framework 1.7. Use getService() instead.

getLicenseLink() : \Zend_Gdata_App_Extension_Link| Type | Description |
|---|---|
| \Zend_Gdata_App_Extension_Link |

getLink(string $rel = null) : mixedGiven a particular 'rel' value, this method returns a matching Zend_Gdata_App_Extension_Link element.
If the 'rel' value is not provided, the full array of Zend_Gdata_App_Extension_Link elements is returned. In an atom feed, each link is represented by an atom:link element. The 'rel' value passed to this function is the atom:link/@rel attribute. Example rel values include 'self', 'edit', and 'alternate'.
| Name | Type | Description |
|---|---|---|
| $rel | string | The rel value of the link to be found. If null, the array of Zend_Gdata_App_Extension_link elements is returned |
| Type | Description |
|---|---|
| mixed | Either a single Zend_Gdata_App_Extension_link element, an array of the same or null is returned depending on the rel value supplied as the argument to this function |

getMajorProtocolVersion() : \(int | \NULL)Get the major protocol version that is in use.
| Type | Description |
|---|---|
| \(int | \NULL) | The major protocol version in use. |
- See
- \global\_majorProtocolVersion

getMinorProtocolVersion() : \(int | \NULL)Get the minor protocol version that is in use.
| Type | Description |
|---|---|
| \(int | \NULL) | The major protocol version in use, or NULL if no minor version is specified. |
- See
- \global\_minorProtocolVersion

getNextLink() : \Zend_Gdata_App_Extension_LinkReturns the Zend_Gdata_App_Extension_Link element which represents the URL used to retrieve the next chunk of results when paging through a feed.
This link is in the atom feed as an atom:link with a rel attribute value of 'next'.
| Type | Description |
|---|---|
| \Zend_Gdata_App_Extension_Link | The link, or null if not found |

getPreviousLink() : \Zend_Gdata_App_Extension_LinkReturns the Zend_Gdata_App_Extension_Link element which represents the URL used to retrieve the previous chunk of results when paging through a feed.
This link is in the atom feed as an atom:link with a rel attribute value of 'previous'.
| Type | Description |
|---|---|
| \Zend_Gdata_App_Extension_Link | The link, or null if not found |

getRights() : \Zend_Gdata_AppExtension_Rights| Type | Description |
|---|---|
| \Zend_Gdata_AppExtension_Rights |

getSelfLink() : \Zend_Gdata_App_Extension_LinkReturns the Zend_Gdata_App_Extension_Link element which represents the URL used to retrieve the entry or feed represented by this object This link is in the atom feed/entry as an atom:link with a rel attribute value of 'self'.
| Type | Description |
|---|---|
| \Zend_Gdata_App_Extension_Link | The link, or null if not found |

getService() : \Zend_Gdata_App | nullGet the active service instance for this object.
This will be used to perform network requests, such as when calling save() and delete().
| Type | Description |
|---|---|
| \Zend_Gdata_App | null | The current service instance, or null if not set. |

getText( $trim = true) : stringReturns the child text node of this element This represents any raw text contained within the XML element
Inherited from: \Zend_Gdata_App_Base::getText()| Name | Type | Description |
|---|---|---|
| $trim |
| Type | Description |
|---|---|
| string | Child text node |

getTitle() : \Zend_Gdata_App_Extension_TitleReturns the title of this feed or entry.
The title is an extremely short textual representation of this resource and is found as an atom:title element in a feed or entry
| Type | Description |
|---|---|
| \Zend_Gdata_App_Extension_Title |

getTitleValue() : stringReturns a string representation of the title of this feed or entry.
The title is an extremely short textual representation of this resource and is found as an atom:title element in a feed or entry
| Type | Description |
|---|---|
| string |

getUpdated() : \Zend_Gdata_App_Extension_Updated| Type | Description |
|---|---|
| \Zend_Gdata_App_Extension_Updated |

getXML() : stringAlias for saveXML() returns XML content for this element and all children
Inherited from: \Zend_Gdata_App_Base::getXML()| Type | Description |
|---|---|
| string | XML content |

lookupNamespace(string $prefix, integer $majorVersion = null, integer $minorVersion = null) : stringGet the full version of a namespace prefix
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.
The current entry or feed's version will be used when performing the namespace lookup unless overridden using $majorVersion and $minorVersion. If the entry/fee has a null version, then the latest protocol version will be used by default.
| Name | Type | Description |
|---|---|---|
| $prefix | string | The namespace prefix to lookup. |
| $majorVersion | integer | The major protocol version in effect. Defaults to null (auto-select). |
| $minorVersion | integer | The minor protocol version in effect. Defaults to null (auto-select). |
| Type | Description |
|---|---|
| string |

registerAllNamespaces(array $namespaceArray) : voidAdd an array of namespaces to the registered list.
Inherited from: \Zend_Gdata_App_Base::registerAllNamespaces()Takes an array in the format of: namespace prefix, namespace URI, major protocol version, minor protocol version and adds them with calls to ->registerNamespace()
| Name | Type | Description |
|---|---|---|
| $namespaceArray | array | An array of namespaces. |

registerNamespace(string $prefix, string $namespaceUri, integer $majorVersion = 1, integer $minorVersion = 0) : voidAdd a namespace and prefix to the registered list
Inherited from: \Zend_Gdata_App_Base::registerNamespace()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().
| Name | Type | Description |
|---|---|---|
| $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). |

saveXML() : stringConverts this element and all children into XML text using getDOM()
Inherited from: \Zend_Gdata_App_Base::saveXML()| Type | Description |
|---|---|
| string | XML content |

setAuthor(array $value) : \Zend_Gdata_App_FeedEntryParentSets the list of the authors of this feed/entry.
In an atom feed, each author is represented by an atom:author element
| Name | Type | Description |
|---|---|---|
| $value | array |
| Type | Description |
|---|---|
| \Zend_Gdata_App_FeedEntryParent | Provides a fluent interface |

setCategory(array $value) : \Zend_Gdata_App_FeedEntryParentSets the array of categories that classify this feed/entry.
Each category is represented in an atom feed by an atom:category element.
| Name | Type | Description |
|---|---|---|
| $value | array | Array of Zend_Gdata_App_Extension_Category |
| Type | Description |
|---|---|
| \Zend_Gdata_App_FeedEntryParent | Provides a fluent interface |

setContributor(array $value) : \Zend_Gdata_App_FeedEntryParentSets the array of contributors to this feed/entry.
Each contributor is represented in an atom feed by an atom:contributor XML element
| Name | Type | Description |
|---|---|---|
| $value | array |
| Type | Description |
|---|---|
| \Zend_Gdata_App_FeedEntryParent | Provides a fluent interface |

setEtag(string | null $value) : \Zend_Gdata_App_EntrySet the Etag for the current entry to $value.
Setting $value to null unsets the Etag.
| Name | Type | Description |
|---|---|---|
| $value | string | null |
| Type | Description |
|---|---|
| \Zend_Gdata_App_Entry | Provides a fluent interface |

setExtensionAttributes(array $value) : \Zend_Gdata_App_BaseSets an array of all extension attributes not transformed into data model properties during parsing of the XML.
Inherited from: \Zend_Gdata_App_Base::setExtensionAttributes()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
| Name | Type | Description |
|---|---|---|
| $value | array | All extension attributes |
| Type | Description |
|---|---|
| \Zend_Gdata_App_Base | Returns an object of the same type as 'this' to provide a fluent interface. |

setExtensionElements(array $value) : \Zend_Gdata_App_BaseSets an array of all elements not matched to data model classes during the parsing of the XML.
Inherited from: \Zend_Gdata_App_Base::setExtensionElements()This method can be used to add arbitrary child XML elements to any data model class.
| Name | Type | Description |
|---|---|---|
| $value | array | All extension elements |
| Type | Description |
|---|---|
| \Zend_Gdata_App_Base | Returns an object of the same type as 'this' to provide a fluent interface. |

setHttpClient(\Zend_Http_Client $httpClient) : \Zend_Gdata_App_FeedEntryParentSet the HTTP client instance
Sets the HTTP client object to use for retrieving the feed.
| Name | Type | Description |
|---|---|---|
| $httpClient | \Zend_Http_Client |
| Type | Description |
|---|---|
| \Zend_Gdata_App_FeedEntryParent | Provides a fluent interface |
- Deprecated
- Deprecated as of Zend Framework 1.7. Use setService() instead.

setId(\Zend_Gdata_App_Extension_Id $value) : \Zend_Gdata_App_FeedEntryParent| Name | Type | Description |
|---|---|---|
| $value | \Zend_Gdata_App_Extension_Id |
| Type | Description |
|---|---|
| \Zend_Gdata_App_FeedEntryParent | Provides a fluent interface |

setLink(array $value) : \Zend_Gdata_App_FeedEntryParent| Name | Type | Description |
|---|---|---|
| $value | array | The array of Zend_Gdata_App_Extension_Link elements |
| Type | Description |
|---|---|
| \Zend_Gdata_App_FeedEntryParent | Provides a fluent interface |

setMajorProtocolVersion(\(int | \NULL) $value) : voidSet the major protocol version that should be used.
Values < 1 (excluding NULL) will cause a Zend_Gdata_App_InvalidArgumentException to be thrown.
| Name | Type | Description |
|---|---|---|
| $value | \(int | \NULL) | The major protocol version to use. |
| Exception | Description |
|---|---|
| \Zend_Gdata_App_InvalidArgumentException |
- See
- \global\_majorProtocolVersion

setMinorProtocolVersion(\(int | \NULL) $value) : voidSet the minor protocol version that should be used.
If set to NULL, no minor protocol version will be sent to the server. Values < 0 will cause a Zend_Gdata_App_InvalidArgumentException to be thrown.
| Name | Type | Description |
|---|---|---|
| $value | \(int | \NULL) | The minor protocol version to use. |
| Exception | Description |
|---|---|
| \Zend_Gdata_App_InvalidArgumentException |
- See
- \global\_minorProtocolVersion

setRights(\Zend_Gdata_App_Extension_Rights $value) : \Zend_Gdata_App_FeedEntryParent| Name | Type | Description |
|---|---|---|
| $value | \Zend_Gdata_App_Extension_Rights |
| Type | Description |
|---|---|
| \Zend_Gdata_App_FeedEntryParent | Provides a fluent interface |

setService(\Zend_Gdata_App $instance) : \Zend_Gdata_App_FeedEntryParentSet the active service instance for this object.
This will be used to perform network requests, such as when calling save() and delete().
| Name | Type | Description |
|---|---|---|
| $instance | \Zend_Gdata_App | The new service instance. |
| Type | Description |
|---|---|
| \Zend_Gdata_App_FeedEntryParent | Provides a fluent interface. |

setText(string $value) : \Zend_Gdata_App_BaseSets the child text node of this element This represents any raw text contained within the XML element
Inherited from: \Zend_Gdata_App_Base::setText()| Name | Type | Description |
|---|---|---|
| $value | string | Child text node |
| Type | Description |
|---|---|
| \Zend_Gdata_App_Base | Returns an object of the same type as 'this' to provide a fluent interface. |

setTitle(\Zend_Gdata_App_Extension_Title $value) : \Zend_Gdata_App_FeedEntryParentReturns the title of this feed or entry.
The title is an extremely short textual representation of this resource and is found as an atom:title element in a feed or entry
| Name | Type | Description |
|---|---|---|
| $value | \Zend_Gdata_App_Extension_Title |
| Type | Description |
|---|---|
| \Zend_Gdata_App_FeedEntryParent | Provides a fluent interface |

setUpdated(\Zend_Gdata_App_Extension_Updated $value) : \Zend_Gdata_App_FeedEntryParent| Name | Type | Description |
|---|---|---|
| $value | \Zend_Gdata_App_Extension_Updated |
| Type | Description |
|---|---|
| \Zend_Gdata_App_FeedEntryParent | Provides a fluent interface |

takeAttributeFromDOM(\DOMNode $attribute) : voidGiven a DOMNode representing an attribute, tries to map the data into instance members.
Inherited from: \Zend_Gdata_App_Base::takeAttributeFromDOM()If no mapping is defined, the name and value are stored in an array.
| Name | Type | Description |
|---|---|---|
| $attribute | \DOMNode | The DOMNode attribute needed to be handled |

takeChildFromDOM(\DOMNode $child) : voidGiven 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.
| Name | Type | Description |
|---|---|---|
| $child | \DOMNode | The DOMNode needed to be handled |

transferFromDOM(\DOMNode $node) : voidTransfers each child and attribute into member variables.
Inherited from: \Zend_Gdata_App_Base::transferFromDOM()This is called when XML is received over the wire and the data model needs to be built to represent this XML.
| Name | Type | Description |
|---|---|---|
| $node | \DOMNode | The DOMNode that represents this object's data |

transferFromXML(string $xml) : voidParses 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).
Inherited from: \Zend_Gdata_App_Base::transferFromXML()The first data model element with the same name as $this->_rootElement is used and the child elements are recursively parsed.
| Name | Type | Description |
|---|---|---|
| $xml | string | The XML text to parse |