Class Zend_Feed_Atom

Description

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.

  • copyright: Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
  • license: New BSD License

Located in /Feed/Atom.php (line 50)

Zend_Feed_Element
   |
   --Zend_Feed_Abstract
      |
      --Zend_Feed_Atom
Variable Summary
Method Summary
 mixed link ([string $rel = null])
 string saveXml ()
 void send ()
 void _mapFeedEntries ( $root, array $array)
 DOMElement _mapFeedHeaders (array $array)
 mixed __get (string $var)
 void __wakeup ()
Variables
string $_defaultNamespace = 'atom' (line 73)

The default namespace for Atom feeds.

  • access: protected
string $_entryClassName = 'Zend_Feed_Entry_Atom' (line 58)

The classname for individual feed elements.

  • access: protected
string $_entryElementName = 'entry' (line 66)

The element name for individual feed elements (Atom <entry> elements).

  • access: protected

Inherited Variables

Inherited from Zend_Feed_Abstract

Zend_Feed_Abstract::$_entries
Zend_Feed_Abstract::$_entryIndex

Inherited from Zend_Feed_Element

Zend_Feed_Element::$_appended
Zend_Feed_Element::$_element
Zend_Feed_Element::$_encoding
Zend_Feed_Element::$_parentElement
Methods
link (line 130)

Easy access to <link> tags keyed by "rel" attributes.

If $elt->link() is called with no arguments, we will attempt to return the value of the <link> 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 <link> 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 <link rel="self"> in the entry.

  • access: public
mixed link ([string $rel = null])
  • string $rel: The "rel" attribute to look for.
saveXml (line 359)

Override Zend_Feed_Element to allow formated feeds

  • access: public
string saveXml ()

Redefinition of:
Zend_Feed_Element::saveXml()
Get an XML string representation of this element
send (line 376)

Send feed to a http client with the correct header

  • throws: Zend_Feed_Exception if headers have already been sent
  • access: public
void send ()

Redefinition of:
Zend_Feed_Abstract::send()
Send feed to a http client with the correct header
_mapFeedEntries (line 269)

Generate the entries of the feed when working in write mode

The following nodes are constructed for each feed entry <entry> <id>url to feed entry</id> <title>entry title</title> <updated>last update</updated> <link rel="alternate" href="url to feed entry" /> <summary>short text</summary> <content>long version, can contain html</content> </entry>

  • access: protected
void _mapFeedEntries ( $root, array $array)
  • array $array: the data to use
  • DOMElement $root: the root node to use

Redefinition of:
Zend_Feed_Abstract::_mapFeedEntries()
Generate the entries of the feed when working in write mode
_mapFeedHeaders (line 189)

Generate the header of the feed when working in write mode

  • return: root node
  • access: protected
DOMElement _mapFeedHeaders (array $array)
  • array $array: the data to use

Redefinition of:
Zend_Feed_Abstract::_mapFeedHeaders()
Generate the header of the feed when working in write mode
__get (line 170)

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

  • access: public
mixed __get (string $var)
  • string $var: The property to access.

Redefinition of:
Zend_Feed_Element::__get()
Map variable access onto the underlying entry representation.
__wakeup (line 82)

Override Zend_Feed_Abstract to set up the $_element and $_entries aliases.

  • throws: Zend_Feed_Exception
  • access: public
void __wakeup ()

Redefinition of:
Zend_Feed_Abstract::__wakeup()
Load the feed as an XML DOMDocument object

Inherited Methods

Inherited From Zend_Feed_Abstract

 Zend_Feed_Abstract::__construct()
 Zend_Feed_Abstract::count()
 Zend_Feed_Abstract::current()
 Zend_Feed_Abstract::key()
 Zend_Feed_Abstract::next()
 Zend_Feed_Abstract::rewind()
 Zend_Feed_Abstract::send()
 Zend_Feed_Abstract::valid()
 Zend_Feed_Abstract::_buildEntryCache()
 Zend_Feed_Abstract::_mapFeedEntries()
 Zend_Feed_Abstract::_mapFeedHeaders()
 Zend_Feed_Abstract::__sleep()
 Zend_Feed_Abstract::__wakeup()

Inherited From Zend_Feed_Element

 Zend_Feed_Element::__construct()
 Zend_Feed_Element::ensureAppended()
 Zend_Feed_Element::getDOM()
 Zend_Feed_Element::getEncoding()
 Zend_Feed_Element::offsetExists()
 Zend_Feed_Element::offsetGet()
 Zend_Feed_Element::offsetSet()
 Zend_Feed_Element::offsetUnset()
 Zend_Feed_Element::saveXml()
 Zend_Feed_Element::saveXmlFragment()
 Zend_Feed_Element::setDOM()
 Zend_Feed_Element::setEncoding()
 Zend_Feed_Element::setParent()
 Zend_Feed_Element::_children()
 Zend_Feed_Element::__call()
 Zend_Feed_Element::__get()
 Zend_Feed_Element::__isset()
 Zend_Feed_Element::__set()
 Zend_Feed_Element::__toString()
 Zend_Feed_Element::__unset()

Documentation generated on Mon, 21 Jun 2010 15:08:00 -0400 by phpDocumentor 1.4.3