Atom feed class
The Zend_Feed_Atom class is a concrete subclass of the general Zend_Feed_Abstract class, tailored for representing an Atom feed. It shares all of the same methods with its abstract parent. The distinction is made in the format of data that Zend_Feed_Atom expects, and as a further pointer for users as to what kind of feed object they have been passed.
category | Zend |
---|---|
package | Zend_Feed |
copyright | Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) |
license | New BSD License |
inherited_from | \Zend_Feed_Abstract |
__call(string $var, mixed $unused) : mixed
Map method calls to get the string value of the requested element. If there are multiple elements that match, this will return an array of those objects.
string
The element to get the string value of.
mixed
This parameter is not used.
mixed
The node's value, null, or an array of nodes.__construct(\DOMElement $element = null
) : void
\DOMElement
The DOM element we're encapsulating.
__get(string $var) : mixed
Special accessors 'entry' and 'entries' are provided so that if you wish to iterate over an Atom feed's entries, you can do so using foreach ($feed->entries as $entry) or foreach ($feed->entry as $entry).
string
The property to access.
mixed
__get(string $var) : mixed
Get-style access returns a Zend_Feed_Element representing the child element accessed. To get string values, use method syntax with the __call() overriding.
string
The property to access.
mixed
__isset(string $var) : boolean
string
boolean
__set(string $var, string $val) : void
string
The property to change.
string
The property's new value.
\Zend_Feed_Exception |
---|
__sleep() : array
array
__toString() : string
string
__unset(string $var) : void
string
__wakeup() : void
inherited_from | \Zend_Feed_Abstract::__wakeup() |
---|
\Zend_Feed_Exception |
---|
__wakeup() : void
\Zend_Feed_Exception |
---|
count() : integer
integer
Entry count.current() : mixed
mixed
The current row, or null if no rows.getDOM() : \DOMDocument
Returns the underlying DOM object, which can then be manipulated with full DOM methods.
\DOMDocument
getEncoding() : string
string
key() : mixed
mixed
The current row number (starts at 0), or NULL if no rowslink(string $rel = null
) : mixed
If $elt->link() is called with no arguments, we will attempt to return the value of the tag(s) like all other method-syntax attribute access. If an argument is passed to link(), however, then we will return the "href" value of the first tag that has a "rel" attribute matching $rel:
$elt->link(): returns the value of the link tag. $elt->link('self'): returns the href from the first in the entry.
string
The "rel" attribute to look for.
mixed
next() : mixed
mixed
The next row, or null if no more rows.offsetExists(string $offset) : boolean
string
boolean
offsetGet(string $offset) : string
string
string
offsetSet(string $offset, string $value) : string
string
string
string
offsetUnset(string $offset) : boolean
string
boolean
rewind() : void
saveXml() : string
string
saveXml() : string
Returns a string of this element's XML, including the XML prologue.
string
saveXmlFragment() : string
Returns a string of this element's XML without prologue.
string
send() : void
inherited_from | \Zend_Feed_Abstract::send() |
---|
\Zend_Feed_Exception |
if headers have already been sent |
---|
send() : void
\Zend_Feed_Exception |
if headers have already been sent |
---|
setDOM(\DOMElement $element) : void
Take a DOMElement object, which may be originally from a call to getDOM() or may be custom created, and use it as the DOM tree for this Zend_Feed_Element.
\DOMElement
setEncoding(string $value) : \Zend_Feed_Element
string
Encoding to use
\Zend_Feed_Element
setParent(\Zend_Feed_Element $element) : void
\Zend_Feed_Element
valid() : boolean
boolean
Whether the iteration is valid_buildEntryCache() : void
_children(string $var) : array
Similar to SimpleXML's children() method.
string
Tagname to match, can be either namespace:tagName or just tagName.
array
_importFeedFromString(string $feed) : string
Protects against XXE attack vectors.
string
\Zend_Feed_Exception |
on detection of an XXE vector |
---|
string
_mapFeedEntries(\DOMElement $root, array $array) : void
The following nodes are constructed for each feed entry
inherited_from | \Zend_Feed_Abstract::_mapFeedEntries() |
---|
\DOMElement
the root node to use
array
the data to use
_mapFeedEntries(\DOMElement $root, array $array) : \DOMElement
\DOMElement
the root node to use
array
the data to use
\DOMElement
root node_mapFeedHeaders(array $array) : \DOMElement
inherited_from | \Zend_Feed_Abstract::_mapFeedHeaders() |
---|
array
the data to use
\DOMElement
root node_mapFeedHeaders(array $array) : \DOMElement
array
the data to use
\DOMElement
root nodeensureAppended() : void
$_appended : boolean
true
$_defaultNamespace : string
'atom'
$_element : \DOMElement
$_encoding : string
'UTF-8'
$_entries : array
$_entryClassName : string
'Zend_Feed_Entry_Atom'
$_entryElementName : string
'entry'
$_entryIndex : integer
0
$_parentElement : \Zend_Feed_Element