## Zend_Feed_Abstract

Description

Implements interfaces:

- Iterator (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.

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

Located in /Zend/Feed/Abstract.php (line 41)

    Zend_Feed_Element
       |
       --Zend_Feed_Abstract

Direct descendents

Class | Description
--- | ---
Zend_Feed_Atom | Atom feed class
Zend_Feed_Rss | RSS channel class

Variable Summary
array $_entries
integer $_entryIndex
Method Summary
Zend_Feed_Abstract __construct ([string $uri = null], [string $string = null])
integer count ()
mixed current ()
mixed key ()
mixed next ()
void rewind ()
boolean valid ()
void _buildEntryCache ()
array __sleep ()
void __wakeup ()
Variables
array $_entries (line 57)

Cache of feed entries.

- access: protected

integer $_entryIndex = 0 (line 50)

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::$_parentElement

Methods
Constructor __construct (line 70)

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.

- access: public
- throws: Zend_Feed_Exception If loading the feed failed.

Zend_Feed_Abstract __construct ([string $uri = null], [string $string = null])

- string $uri: The full URI of the feed to load, or NULL if not retrieved via HTTP.
- string $string: The feed as a string, or NULL if retrieved via HTTP.

Redefinition of:

Zend_Feed_Element::__construct()
  Zend_Feed_Element constructor.

count (line 143)

Get the number of entries in this feed object.

- return: Entry count.
- access: public

integer count ()
current (line 167)

Required by the Iterator interface.

- return: The current row, or null if no rows.
- access: public

mixed current ()

Implementation of:

Iterator::current

key (line 182)

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

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

Required by the Iterator interface.

- access: public

void rewind ()

Implementation of:

Iterator::rewind

valid (line 208)

Required by the Iterator interface.

- return: Whether the iteration is valid
- access: public

boolean valid ()

Implementation of:

Iterator::valid

_buildEntryCache (line 127)

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

- access: protected

void _buildEntryCache ()
__sleep (line 113)

Prepare for serialiation

- access: public

array __sleep ()
__wakeup (line 93)

Load the feed as an XML DOMDocument object

- access: public

void __wakeup ()

Redefined in descendants as:

- Zend_Feed_Atom::__wakeup() : Override Zend_Feed_Abstract to set up the $_element and $_entries aliases.
- Zend_Feed_Rss::__wakeup() : Override Zend_Feed_Abstract to set up the $_element and $_entries aliases.

#### Inherited Methods

Inherited From Zend_Feed_Element

> Zend_Feed_Element::__construct()
> Zend_Feed_Element::ensureAppended()
> Zend_Feed_Element::getDOM()
> 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::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 Wed, 21 Feb 2007 11:45:15 -0800 by phpDocumentor 1.3.1