Inheritances
Files
Overview
FRAMES
NO FRAMES

Class Zend_Feed_Atom

Zend_Feed
|- class Zend_Feed_Atom extends Zend_Feed_Abstract
Defined in line 50 of file Feed/Atom.php.
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.
CategoryZend
PackageZend_Feed
CopyrightCopyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
Licensehttp://framework.zend.com/license/new-bsd New BSD License

Summary

Instance fields
# $_defaultNamespace The default namespace for Atom feeds
# $_entryClassName The classname for individual feed elements
# $_entryElementName The element name for individual feed elements (Atom
Instance methods
+ __get() Make accessing some individual elements of the feed easier.
+ __wakeup() Override Zend_Feed_Abstract to set up the $_element and $_entries aliases
# _mapFeedEntries() Generate the entries of the feed when working in write mode
# _mapFeedHeaders() Generate the header of the feed when working in write mode
+ link() Easy access to tags keyed by "rel" attributes.
+ saveXml() Override Zend_Feed_Element to allow formated feeds
+ send() Send feed to a http client with the correct header

Details

Instance fields

$_defaultNamespace
protected $_defaultNamespace = 'atom'
The default namespace for Atom feeds.
Var string
$_entryClassName
protected $_entryClassName = 'Zend_Feed_Entry_Atom'
The classname for individual feed elements.
Var string
$_entryElementName
protected $_entryElementName = 'entry'
The element name for individual feed elements (Atom
elements).
Var string

Instance methods

__get()
public function __get( $var)
Make accessing some individual elements of the feed easier.

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).
Parameters
string $var The property to access.
Returns mixed
__wakeup()
public function __wakeup( )
Override Zend_Feed_Abstract to set up the $_element and $_entries aliases.
Returns void
_mapFeedEntries()
protected function _mapFeedEntries( DOMElement $root
$array
)
Generate the entries of the feed when working in write mode

The following nodes are constructed for each feed entry

url to feed entry
entry title
last update

short text
long version, can contain html
Parameters
DOMElement $root
array $array the data to use
Returns void
_mapFeedHeaders()
protected function _mapFeedHeaders( $array)
Generate the header of the feed when working in write mode
Parameters
array $array the data to use
Returns DOMElement root node
link()
public function link( $rel = null)
Easy access to tags keyed by "rel" attributes.

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.
Parameters
string $rel The "rel" attribute to look for.
Returns mixed
saveXml()
public function saveXml( )
Override Zend_Feed_Element to allow formated feeds
Returns string
send()
public function send( )
Send feed to a http client with the correct header
Returns void
Throws Zend_Feed_Exception if headers have already been sent