API Documentation

Feed/Abstract.php

Includes Classes 
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Feed
version
$Id: Abstract.php 20096 2010-01-06 02:05:09Z bkarwin $
Classes
Zend_Feed_Abstract

Description

Zend Framework

LICENSE

This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.

Zend_Feed_Abstract

Extends from
Zend_Feed_Element
Implements
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Feed
Properties
$_entryIndex
$_entries
Methods
__construct
__wakeup
__sleep
_buildEntryCache
count
rewind
current
key
next
valid
_mapFeedHeaders
_mapFeedEntries
send

Description

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.

Properties

$_entries

array $_entries = ''

Cache of feed entries.

Details

$_entries
array
visibility
protected
default
final
false
static
false

$_entryIndex

integer $_entryIndex = '0'

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

Details

$_entryIndex
integer
visibility
protected
default
0
final
false
static
false

Methods

__construct

__construct( string $uri = null, string $string = null, Zend_Feed_Builder_Interface $builder = null ) : void

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.

Arguments
$uri
string
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.
$builder
Zend_Feed_Builder_Interface
The feed as a builder instance or NULL if retrieved as a string or via HTTP.
Details
visibility
public
final
false
static
false
throws
If loading the feed failed.

__sleep

__sleep( ) : array

Prepare for serialiation

Output
array
Details
visibility
public
final
false
static
false

__wakeup

__wakeup( ) : void

Load the feed as an XML DOMDocument object

Details
visibility
public
final
false
static
false
throws

_buildEntryCache

_buildEntryCache( ) : void

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

Details
visibility
protected
final
false
static
false

_mapFeedEntries

_mapFeedEntries( DOMElement $root, array $array ) : DOMElement

Generate the entries of the feed when working in write mode

Arguments
$root
DOMElement
the root node to use
$array
array
the data to use
Output
DOMElement
root node
Details
visibility
protected
final
false
static
false

_mapFeedHeaders

_mapFeedHeaders( array $array ) : DOMElement

Generate the header of the feed when working in write mode

Arguments
$array
array
the data to use
Output
DOMElement
root node
Details
visibility
protected
final
false
static
false

count

count( ) : integer

Get the number of entries in this feed object.

Output
integer
Entry count.
Details
visibility
public
final
false
static
false

current

current( ) : mixed

Required by the Iterator interface.

Output
mixed
The current row, or null if no rows.
Details
visibility
public
final
false
static
false

key

key( ) : mixed

Required by the Iterator interface.

Output
mixed
The current row number (starts at 0), or NULL if no rows
Details
visibility
public
final
false
static
false

next

next( ) : mixed

Required by the Iterator interface.

Output
mixed
The next row, or null if no more rows.
Details
visibility
public
final
false
static
false

rewind

rewind( ) : void

Required by the Iterator interface.

Details
visibility
public
final
false
static
false

send

send( ) : void

Send feed to a http client with the correct header

Details
visibility
public
final
false
static
false
throws
if headers have already been sent

valid

valid( ) : boolean

Required by the Iterator interface.

Output
boolean
Whether the iteration is valid
Details
visibility
public
final
false
static
false
Documentation was generated by DocBlox.