Class Horde_Feed_Atom

Description

Atom feed class

The Horde_Feed_Atom class is a concrete subclass of the general Horde_Feed_Base class, tailored for representing an Atom feed. It shares all of the same methods with its parent. The distinction is made in the format of data that Horde_Feed_Atom expects, and as a further pointer for users as to what kind of feed object they have been passed.

Located in /Feed/lib/Horde/Feed/Atom.php (line 24)

Horde_Xml_Element
   |
   --Horde_Feed_Base
      |
      --Horde_Feed_Atom
Variable Summary
Method Summary
 mixed link ([string $rel = null])
 mixed __get (string $var)
 void __wakeup ()
Variables
string $_defaultNamespace = 'atom' (line 46)

The default namespace for Atom feeds.

  • access: protected
string $_emptyXml = '<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom"></feed>' (line 53)

The XML string for an "empty" Atom feed.

  • access: protected
string $_entryClassName = 'Horde_Feed_Entry_Atom' (line 31)

The classname for individual feed elements.

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

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

  • access: protected

Inherited Variables

Inherited from Horde_Feed_Base

Horde_Feed_Base::$_entries
Horde_Feed_Base::$_entryIndex
Horde_Feed_Base::$_uri

Inherited from Horde_Xml_Element

Horde_Xml_Element::$_appended
Horde_Xml_Element::$_element
Horde_Xml_Element::$_namespaces
Horde_Xml_Element::$_parentElement
Horde_Xml_Element::$_serialized
Methods
link (line 87)

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.
__get (line 125)

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:
Horde_Xml_Element::__get()
Map variable access onto the underlying entry representation.
__wakeup (line 58)

Set up the $_entries alias.

  • access: public
void __wakeup ()

Redefinition of:
Horde_Feed_Base::__wakeup()
Handle null or array values for $this->_element by initializing with $this->_emptyXml, and importing the array with Horde_Xml_Element::fromArray() if necessary.

Inherited Methods

Inherited From Horde_Feed_Base

 Horde_Feed_Base::__construct()
 Horde_Feed_Base::count()
 Horde_Feed_Base::current()
 Horde_Feed_Base::key()
 Horde_Feed_Base::next()
 Horde_Feed_Base::rewind()
 Horde_Feed_Base::valid()
 Horde_Feed_Base::__wakeup()

Inherited From Horde_Xml_Element

 Horde_Xml_Element::__construct()
 Horde_Xml_Element::appendChild()
 Horde_Xml_Element::fromArray()
 Horde_Xml_Element::getDom()
 Horde_Xml_Element::lookupNamespace()
 Horde_Xml_Element::offsetExists()
 Horde_Xml_Element::offsetGet()
 Horde_Xml_Element::offsetSet()
 Horde_Xml_Element::offsetUnset()
 Horde_Xml_Element::registerNamespace()
 Horde_Xml_Element::saveXml()
 Horde_Xml_Element::saveXmlFragment()
 Horde_Xml_Element::setDom()
 Horde_Xml_Element::setParent()
 Horde_Xml_Element::_children()
 Horde_Xml_Element::_ensureAppended()
 Horde_Xml_Element::__call()
 Horde_Xml_Element::__get()
 Horde_Xml_Element::__isset()
 Horde_Xml_Element::__set()
 Horde_Xml_Element::__sleep()
 Horde_Xml_Element::__toString()
 Horde_Xml_Element::__unset()
 Horde_Xml_Element::__wakeup()

Documentation generated on Sun, 30 Jan 2011 05:15:14 +0000 by phpDocumentor 1.4.3