Abstract Class Zend_Feed_Abstract

Description

Implements interfaces:

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

The Zend_Feed_Abstract class is an abstract class representing feeds.

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

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

Located in /Feed/Abstract.php (line 43)

Zend_Feed_Element
   |
   --Zend_Feed_Abstract
Direct descendents
Class Description
 class Zend_Feed_Rss RSS channel class
 class Zend_Feed_Atom Atom feed class
Variable Summary
 array $_entries
 integer $_entryIndex
Method Summary
 void __construct ([string $uri = null], [string $string = null], [Zend_Feed_Builder_Interface $builder = null])
 integer count ()
 mixed current ()
 mixed key ()
 mixed next ()
 void rewind ()
 void send ()
 boolean valid ()
 DOMElement _mapFeedEntries ( $root, array $array)
 DOMElement _mapFeedHeaders (array $array)
 array __sleep ()
 void __wakeup ()
Variables
array $_entries (line 58)

Cache of feed entries.

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

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

  • access: protected

Inherited Variables

Inherited from Zend_Feed_Element

Zend_Feed_Element::$_appended
Zend_Feed_Element::$_element
Zend_Feed_Element::$_encoding
Zend_Feed_Element::$_parentElement
Methods
Constructor __construct (line 72)

Feed constructor

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

  • throws: Zend_Feed_Exception If loading the feed failed.
  • access: public
void __construct ([string $uri = null], [string $string = null], [Zend_Feed_Builder_Interface $builder = null])
  • string $uri: The full URI of the feed to load, or NULL if not retrieved via HTTP or as an array.
  • string $string: The feed as a string, or NULL if retrieved via HTTP or as an array.
  • Zend_Feed_Builder_Interface $builder: The feed as a builder instance or NULL if retrieved as a string or via HTTP.

Redefinition of:
Zend_Feed_Element::__construct()
Zend_Feed_Element constructor.
count (line 173)

Get the number of entries in this feed object.

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

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

Required by the Iterator interface.

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

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

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

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

Required by the Iterator interface.

  • access: public
void rewind ()

Implementation of:
Iterator::rewind
send (line 258)

Send feed to a http client with the correct header

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

Redefined in descendants as:
valid (line 230)

Required by the Iterator interface.

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

Implementation of:
Iterator::valid
_buildEntryCache (line 157)

Cache the individual feed elements so they don't need to be searched for on every operation.

  • access: protected
void _buildEntryCache ()
_mapFeedEntries (line 250)

Generate the entries of the feed when working in write mode

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

Redefined in descendants as:
_mapFeedHeaders (line 241)

Generate the header of the feed when working in write mode

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

Redefined in descendants as:
__sleep (line 143)

Prepare for serialiation

  • access: public
array __sleep ()
__wakeup (line 110)

Load the feed as an XML DOMDocument object

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

Redefined in descendants as:

Inherited Methods

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:05:21 -0400 by phpDocumentor 1.4.3