Abstract Class Horde_Feed_Base

Description

Implements interfaces:

  • Iterator (internal interface)
  • Countable (internal interface)

The Horde_Feed_Base class is an abstract class representing feeds.

Horde_Feed_Base implements two core PHP 5 interfaces: ArrayAccess and Iterator. In both cases the collection being treated as an array is considered to be the entry collection, such that iterating over the feed takes you through each of the feed's entries.

  • abstract:

Located in /Feed/lib/Horde/Feed/Base.php (line 23)

Horde_Xml_Element
   |
   --Horde_Feed_Base
Direct descendents
Class Description
 class Horde_Feed_Atom Atom feed class
 class Horde_Feed_Blogroll Blogroll feed list class
 class Horde_Feed_Rss RSS channel class
Variable Summary
 array $_entries
 integer $_entryIndex
 string $_uri
Method Summary
 Horde_Feed_Base __construct ([mixed $xml = null], [string $uri = null])
 integer count ()
 mixed current ()
 mixed key ()
 mixed next ()
 void rewind ()
 boolean valid ()
 void __wakeup ()
Variables
array $_entries (line 38)

Cache of feed entries

  • access: protected
integer $_entryIndex = 0 (line 31)

Current index on the collection of feed entries for the Iterator implementation

  • access: protected
string $_uri (line 45)

Our root ("home") URI

  • access: protected

Inherited Variables

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
Constructor __construct (line 58)

Feed constructor

The Horde_Feed_Base constructor takes the URI of a feed or a feed represented as a string and loads it as XML.

  • throws: Horde_Feed_Exception If loading the feed failed.
  • access: public
Horde_Feed_Base __construct ([mixed $xml = null], [string $uri = null])
  • mixed $xml: The feed as a string, a DOMElement, or null.
  • string $uri: The full URI of the feed, or null if unknown.

Redefinition of:
Horde_Xml_Element::__construct()
Horde_Xml_Element constructor.
count (line 101)

Get the number of entries in this feed object.

  • return: Entry count.
  • access: public
integer count ()

Implementation of:
Countable::count
current (line 123)

Required by the Iterator interface.

  • return: The current row, or null if no rows.
  • access: public
mixed current ()

Implementation of:
Iterator::current
key (line 136)

Required by the Iterator interface.

  • return: The current row number (starts at 0), or null if no rows
  • access: public
mixed key ()

Implementation of:
Iterator::key
next (line 148)

Required by the Iterator interface.

  • return: The next row, or null if no more rows.
  • access: public
mixed next ()

Implementation of:
Iterator::next
rewind (line 111)

Required by the Iterator interface.

  • access: public
void rewind ()

Implementation of:
Iterator::rewind
valid (line 160)

Required by the Iterator interface.

  • return: Whether the iteration is valid
  • access: public
boolean valid ()

Implementation of:
Iterator::valid
__wakeup (line 77)

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

  • see: Horde_Xml_Element::__wakeup
  • see: Horde_Xml_Element::fromArray
  • access: public
void __wakeup ()

Redefinition of:
Horde_Xml_Element::__wakeup()
Unserialization handler; parse $this->_element as either an XML string or a real DOMElement.

Redefined in descendants as:

Inherited Methods

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:28 +0000 by phpDocumentor 1.4.3