The Gdata flavor of an Atom Feed

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

 Methods

__construct()

__construct($element = null

Parameters

$element

__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

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

Adds an entry representation to the array of entries contained within this feed

addEntry($value) : \Zend_Gdata_App_Feed
Inherited

Parameters

$value

Returns

\Zend_Gdata_App_FeedProvides a fluent interface

Get the number of entries in this feed object.

count() : integer
Inherited

Returns

integerEntry count.

Required by the Iterator interface.

current() : mixed
Inherited

Returns

mixedThe current row, or null if no rows.

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().

getAuthor()

getAuthor() : \Zend_Gdata_App_Extension_Author
Inherited

Returns

\Zend_Gdata_App_Extension_Author

Returns the array of categories that classify this feed/entry. Each category is represented in an atom feed by an atom:category element.

getCategory() : array
Inherited

Returns

arrayArray of Zend_Gdata_App_Extension_Category

Returns the array of contributors to this feed/entry. Each contributor is represented in an atom feed by an atom:contributor XML element

getContributor() : array
Inherited

Returns

arrayAn array of Zend_Gdata_App_Extension_Contributor

Retrieves the DOM model representing this object and all children

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

Parameters

$doc

$majorVersion

$minorVersion

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.

Gets the array of atom:entry elements contained within this atom:feed representation

getEntry() : array
Inherited

Returns

arrayZend_Gdata_App_Entry array

Return the Etag for the current entry, or null if not set.

getEtag() : string | null
Inherited

Returns

stringnull

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

getGenerator()

getGenerator() : \Zend_Gdata_AppExtension_Generator
Inherited

Returns

\Zend_Gdata_AppExtension_Generator

Gets the HTTP client object. If none is set, a new Zend_Http_Client will be used.

getHttpClient() : \Zend_Http_Client_Abstract
Inherited
deprecated Deprecated as of Zend Framework 1.7. Use getService() instead.

Returns

\Zend_Http_Client_Abstract

getIcon()

getIcon() : \Zend_Gdata_AppExtension_Icon
Inherited

Returns

\Zend_Gdata_AppExtension_Icon

getId()

getId() : \Zend_Gdata_App_Extension_Id
Inherited

Returns

\Zend_Gdata_App_Extension_Id

Get the value of the itemsPerPage property.

getItemsPerPage() : \Zend_Gdata_Extension_OpenSearchItemsPerPage | null

Returns

\Zend_Gdata_Extension_OpenSearchItemsPerPagenullThe value of the itemsPerPage property, or null if unset.

Get the major protocol version that is in use.

getMajorProtocolVersion() : \(int | \NULL)
Inherited
see

Returns

\(int\NULL)The major protocol version in use.

Get the minor protocol version that is in use.

getMinorProtocolVersion() : \(int | \NULL)
Inherited
see

Returns

\(int\NULL)The major protocol version in use, or NULL if no minor version is specified.

Retrieve the next set of results from this feed.

getNextFeed() : mixed | null
Inherited

Exceptions

\Zend_Gdata_App_Exception

Returns

mixednullReturns the next set of results as a feed of the same class as this feed, or null if no results exist.

Retrieve the previous set of results from this feed.

getPreviousFeed() : mixed | null
Inherited

Exceptions

\Zend_Gdata_App_Exception

Returns

mixednullReturns the previous set of results as a feed of the same class as this feed, or null if no results exist.

getRights()

getRights() : \Zend_Gdata_AppExtension_Rights
Inherited

Returns

\Zend_Gdata_AppExtension_Rights

Get the active service instance for this object. This will be used to perform network requests, such as when calling save() and delete().

getService() : \Zend_Gdata_App | null
Inherited

Returns

\Zend_Gdata_AppnullThe current service instance, or null if not set.

Get the value of the startIndex property.

getStartIndex() : \Zend_Gdata_Extension_OpenSearchStartIndex | null

Returns

\Zend_Gdata_Extension_OpenSearchStartIndexnullThe value of the startIndex property, or null if unset.

getSubtitle()

getSubtitle() : \Zend_Gdata_AppExtension_Subtitle
Inherited

Returns

\Zend_Gdata_AppExtension_Subtitle

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

Returns 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

getTitle() : \Zend_Gdata_App_Extension_Title
Inherited

Returns

\Zend_Gdata_App_Extension_Title

Returns a string representation of the title of this feed or entry.

getTitleValue() : string
Inherited

The title is an extremely short textual representation of this resource and is found as an atom:title element in a feed or entry

Returns

string

Get the value of the totalResults property.

getTotalResults() : \Zend_Gdata_Extension_OpenSearchTotalResults | null

Returns

\Zend_Gdata_Extension_OpenSearchTotalResultsnullThe value of the totalResults property, or null if unset.

getUpdated()

getUpdated() : \Zend_Gdata_App_Extension_Updated
Inherited

Returns

\Zend_Gdata_App_Extension_Updated

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

getXML() : string
Inherited

Returns

stringXML content

Required by the Iterator interface.

key() : mixed
Inherited

Returns

mixedThe current row number (starts at 0), or NULL if no rows

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

Required by the Iterator interface.

next() : mixed
Inherited

Returns

mixedThe next row, or null if no more rows.

Required by the ArrayAccess interface

offsetExists(integer $key) : boolean
Inherited

Parameters

$key

integer

The index to check for existence

Returns

boolean

Required by the ArrayAccess interface

offsetGet(integer $key) 
Inherited

Parameters

$key

integer

The index to get

Required by the ArrayAccess interface

offsetSet(integer $key, \Zend_Gdata_App_Entry $value) : void
Inherited

Parameters

$key

integer

The index to set

$value

\Zend_Gdata_App_Entry

The value to set

Required by the ArrayAccess interface

offsetUnset(integer $key) 
Inherited

Parameters

$key

integer

The index to set

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

Required by the Iterator interface.

rewind() : void
Inherited

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

saveXML() : string
Inherited

Returns

stringXML content

Sets the list of the authors of this feed/entry. In an atom feed, each author is represented by an atom:author element

setAuthor(array $value) : \Zend_Gdata_App_FeedEntryParent
Inherited

Parameters

$value

array

Returns

\Zend_Gdata_App_FeedEntryParentProvides a fluent interface

Sets the array of categories that classify this feed/entry. Each category is represented in an atom feed by an atom:category element.

setCategory(array $value) : \Zend_Gdata_App_FeedEntryParent
Inherited

Parameters

$value

array

Array of Zend_Gdata_App_Extension_Category

Returns

\Zend_Gdata_App_FeedEntryParentProvides a fluent interface

Sets the array of contributors to this feed/entry. Each contributor is represented in an atom feed by an atom:contributor XML element

setContributor(array $value) : \Zend_Gdata_App_FeedEntryParent
Inherited

Parameters

$value

array

Returns

\Zend_Gdata_App_FeedEntryParentProvides a fluent interface

Sets the array of atom:entry elements contained within this atom:feed representation

setEntry(array $value) : \Zend_Gdata_App_Feed
Inherited

Parameters

$value

array

The array of Zend_Gdata_App_Entry elements

Returns

\Zend_Gdata_App_FeedProvides a fluent interface

Set the Etag for the current entry to $value. Setting $value to null unsets the Etag.

setEtag(string|null $value) : \Zend_Gdata_App_Entry
Inherited

Parameters

$value

stringnull

Returns

\Zend_Gdata_App_EntryProvides a fluent interface

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.

setGenerator()

setGenerator(\Zend_Gdata_App_Extension_Generator $value) : \Zend_Gdata_App_FeedSourceParent
Inherited

Parameters

$value

\Zend_Gdata_App_Extension_Generator

Returns

\Zend_Gdata_App_FeedSourceParentProvides a fluent interface

Set the HTTP client instance

setHttpClient(\Zend_Http_Client $httpClient) : \Zend_Gdata_App_FeedEntryParent
Inherited

Sets the HTTP client object to use for retrieving the feed.

deprecated Deprecated as of Zend Framework 1.7. Use setService() instead.

Parameters

$httpClient

\Zend_Http_Client

Returns

\Zend_Gdata_App_FeedEntryParentProvides a fluent interface

setIcon()

setIcon(\Zend_Gdata_App_Extension_Icon $value) : \Zend_Gdata_App_FeedSourceParent
Inherited

Parameters

$value

\Zend_Gdata_App_Extension_Icon

Returns

\Zend_Gdata_App_FeedSourceParentProvides a fluent interface

setId()

setId(\Zend_Gdata_App_Extension_Id $value) : \Zend_Gdata_App_FeedEntryParent
Inherited

Parameters

$value

\Zend_Gdata_App_Extension_Id

Returns

\Zend_Gdata_App_FeedEntryParentProvides a fluent interface

Set the itemsPerPage property.

setItemsPerPage(\Zend_Gdata_Extension_OpenSearchItemsPerPage|null $value) : \Zend_Gdata_Feed

Parameters

$value

\Zend_Gdata_Extension_OpenSearchItemsPerPagenull

The value for the itemsPerPage property. Use nul to unset.

Returns

\Zend_Gdata_FeedProvides a fluent interface.

Set the major protocol version that should be used. Values < 1 (excluding NULL) will cause a Zend_Gdata_App_InvalidArgumentException to be thrown.

setMajorProtocolVersion(\(int|\NULL) $value) 
Inherited
see

Parameters

$value

\(int\NULL)

The major protocol version to use.

Exceptions

\Zend_Gdata_App_InvalidArgumentException

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

setMinorProtocolVersion(\(int|\NULL) $value) 
Inherited
see

Parameters

$value

\(int\NULL)

The minor protocol version to use.

Exceptions

\Zend_Gdata_App_InvalidArgumentException

setRights()

setRights(\Zend_Gdata_App_Extension_Rights $value) : \Zend_Gdata_App_FeedEntryParent
Inherited

Parameters

$value

\Zend_Gdata_App_Extension_Rights

Returns

\Zend_Gdata_App_FeedEntryParentProvides a fluent interface

Set the active service instance for this object. This will be used to perform network requests, such as when calling save() and delete().

setService(\Zend_Gdata_App $instance) : \Zend_Gdata_App_FeedEntryParent
Inherited

Parameters

$instance

\Zend_Gdata_App

The new service instance.

Returns

\Zend_Gdata_App_FeedEntryParentProvides a fluent interface.

Set the start index property for feed paging.

setStartIndex(\Zend_Gdata_Extension_OpenSearchStartIndex|null $value) : \Zend_Gdata_Feed

Parameters

$value

\Zend_Gdata_Extension_OpenSearchStartIndexnull

The value for the startIndex property. Use null to unset.

Returns

\Zend_Gdata_FeedProvides a fluent interface.

setSubtitle()

setSubtitle(\Zend_Gdata_App_Extension_Subtitle $value) : \Zend_Gdata_App_FeedSourceParent
Inherited

Parameters

$value

\Zend_Gdata_App_Extension_Subtitle

Returns

\Zend_Gdata_App_FeedSourceParentProvides a fluent interface

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.

Returns 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

setTitle(\Zend_Gdata_App_Extension_Title $value) : \Zend_Gdata_App_FeedEntryParent
Inherited

Parameters

$value

\Zend_Gdata_App_Extension_Title

Returns

\Zend_Gdata_App_FeedEntryParentProvides a fluent interface

Set the value of the totalResults property.

setTotalResults(\Zend_Gdata_Extension_OpenSearchTotalResults|null $value) : \Zend_Gdata_Feed

Parameters

$value

\Zend_Gdata_Extension_OpenSearchTotalResultsnull

The value of the totalResults property. Use null to unset.

Returns

\Zend_Gdata_FeedProvides a fluent interface.

setUpdated()

setUpdated(\Zend_Gdata_App_Extension_Updated $value) : \Zend_Gdata_App_FeedEntryParent
Inherited

Parameters

$value

\Zend_Gdata_App_Extension_Updated

Returns

\Zend_Gdata_App_FeedEntryParentProvides 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

Required by the Iterator interface.

valid() : boolean
Inherited

Returns

booleanWhether the iteration is valid

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) 

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

Creates individual Entry objects of the appropriate type and stores them in the $_entry array based upon DOM data.

takeChildFromDOM(\DOMNode $child) 
inherited_from \Zend_Gdata_App_Feed::takeChildFromDOM()

Parameters

$child

\DOMNode

The DOMNode to process

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

 

$_author

$_author 

Default

array()
 

$_category

$_category 

Default

array()
 

$_contributor

$_contributor 

Default

array()
 

Cache of feed entries.

$_entry : array

Default

array()
 

The classname for individual feed elements.

$_entryClassName : string

Default

'Zend_Gdata_Entry'
 

The classname for individual feed elements.

$_entryClassName : string

Default

'Zend_Gdata_App_Entry'
 

Current location in $_entry array

$_entryIndex : integer

Default

0
 

The HTTP ETag associated with this entry. Used for optimistic concurrency in protoco v2 or greater.

$_etag : string | null

Default

NULL
 

Leftover attributes which were not handled

$_extensionAttributes : array

Default

array()
 

Leftover elements which were not handled

$_extensionElements : array

Default

array()
 

$_generator

$_generator 

Default

null
 

$_icon

$_icon 

Default

null
 

$_id

$_id 

Default

null
 

The openSearch:itemsPerPage element

$_itemsPerPage : \Zend_Gdata_Extension_OpenSearchItemsPerPage | null

Default

null
   

Indicates the major protocol version that should be used.

$_majorProtocolVersion 

Default

1

At present, recognized values are either 1 or 2. However, any integer value >= 1 is considered valid.

see
see
 

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

$_minorProtocolVersion 

Default

null
see
see
 

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
 

$_rights

$_rights 

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
 

Service instance used to make network requests.

$_service 

Default

null
 

The openSearch:startIndex element

$_startIndex : \Zend_Gdata_Extension_OpenSearchStartIndex | null

Default

null
 

$_subtitle

$_subtitle 

Default

null
 

XML child text node content

$_text : string

Default

null
 

$_title

$_title 

Default

null
 

The openSearch:totalResults element

$_totalResults : \Zend_Gdata_Extension_OpenSearchTotalResults | null

Default

null
 

$_updated

$_updated 

Default

null