Zend Framework  1.12
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Zend_Feed_Abstract Class Reference

Public Member Functions

 __construct ($uri=null, $string=null, Zend_Feed_Builder_Interface $builder=null)
 Feed constructor.
 
 __wakeup ()
 Load the feed as an XML DOMDocument object.
 
 __sleep ()
 Prepare for serialiation.
 
 count ()
 Get the number of entries in this feed object.
 
 rewind ()
 Required by the Iterator interface.
 
 current ()
 Required by the Iterator interface.
 
 key ()
 Required by the Iterator interface.
 
 next ()
 Required by the Iterator interface.
 
 valid ()
 Required by the Iterator interface.
 
 send ()
 Send feed to a http client with the correct header.
 
- Public Member Functions inherited from Zend_Feed_Element
 __construct ($element=null)
 Zend_Feed_Element constructor.
 
 getDOM ()
 Get a DOM representation of the element.
 
 setDOM (DOMElement $element)
 Update the object from a DOM element.
 
 setParent (Zend_Feed_Element $element)
 Set the parent element of this object to another Zend_Feed_Element.
 
 saveXml ()
 Get an XML string representation of this element.
 
 saveXmlFragment ()
 Get the XML for only this element.
 
 getEncoding ()
 Get encoding.
 
 setEncoding ($value)
 Set encoding.
 
 __get ($var)
 Map variable access onto the underlying entry representation.
 
 __set ($var, $val)
 Map variable sets onto the underlying entry representation.
 
 __isset ($var)
 Map isset calls onto the underlying entry representation.
 
 __call ($var, $unused)
 Get the value of an element with method syntax.
 
 __unset ($var)
 Remove all children matching $var.
 
 __toString ()
 Returns the nodeValue of this element when this object is used in a string context.
 
 offsetExists ($offset)
 Required by the ArrayAccess interface.
 
 offsetGet ($offset)
 Required by the ArrayAccess interface.
 
 offsetSet ($offset, $value)
 Required by the ArrayAccess interface.
 
 offsetUnset ($offset)
 Required by the ArrayAccess interface.
 

Protected Member Functions

 _buildEntryCache ()
 Cache the individual feed elements so they don't need to be searched for on every operation.
 
 _mapFeedHeaders ($array)
 Generate the header of the feed when working in write mode.
 
 _mapFeedEntries (DOMElement $root, $array)
 Generate the entries of the feed when working in write mode.
 
 _importFeedFromString ($feed)
 Import a feed from a string.
 
- Protected Member Functions inherited from Zend_Feed_Element
 ensureAppended ()
 Appends this element to its parent if necessary.
 
 _children ($var)
 Finds children with tagnames matching $var.
 

Protected Attributes

 $_entryIndex = 0
 
 $_entries
 
- Protected Attributes inherited from Zend_Feed_Element
 $_element
 
 $_encoding = 'UTF-8'
 
 $_parentElement
 
 $_appended = true
 

Constructor & Destructor Documentation

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

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.

Parameters
string$uriThe full URI of the feed to load, or NULL if not retrieved via HTTP or as an array.
string$stringThe feed as a string, or NULL if retrieved via HTTP or as an array.
Zend_Feed_Builder_Interface$builderThe feed as a builder instance or NULL if retrieved as a string or via HTTP.
Returns
void
Exceptions
Zend_Feed_ExceptionIf loading the feed failed.
See Also
Zend_Feed_Exception

Member Function Documentation

__sleep ( )

Prepare for serialiation.

Returns
array
__wakeup ( )

Load the feed as an XML DOMDocument object.

Returns
void
Exceptions
Zend_Feed_Exception
See Also
Zend_Feed_Exception
_buildEntryCache ( )
protected

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

Returns
void
_importFeedFromString (   $feed)
protected

Import a feed from a string.

Protects against XXE attack vectors.

Parameters
string$feed
Returns
string
Exceptions
Zend_Feed_Exceptionon detection of an XXE vector
See Also
Zend_Feed_Exception
_mapFeedEntries ( DOMElement  $root,
  $array 
)
abstractprotected

Generate the entries of the feed when working in write mode.

Parameters
DOMElement$rootthe root node to use
array$arraythe data to use
Returns
DOMElement root node
_mapFeedHeaders (   $array)
abstractprotected

Generate the header of the feed when working in write mode.

Parameters
array$arraythe data to use
Returns
DOMElement root node
count ( )

Get the number of entries in this feed object.

Returns
integer Entry count.
current ( )

Required by the Iterator interface.

Returns
mixed The current row, or null if no rows.
key ( )

Required by the Iterator interface.

Returns
mixed The current row number (starts at 0), or NULL if no rows
next ( )

Required by the Iterator interface.

Returns
mixed The next row, or null if no more rows.
rewind ( )

Required by the Iterator interface.

Returns
void
send ( )
abstract

Send feed to a http client with the correct header.

Exceptions
Zend_Feed_Exceptionif headers have already been sent
Returns
void
valid ( )

Required by the Iterator interface.

Returns
boolean Whether the iteration is valid

Member Data Documentation

$_entries
protected
$_entryIndex = 0
protected