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

Public Member Functions

 __wakeup ()
 Override Zend_Feed_Abstract to set up the $_element and $_entries aliases.
 
 link ($rel=null)
 Easy access to <link> tags keyed by "rel" attributes.
 
 __get ($var)
 Make accessing some individual elements of the feed easier.
 
 saveXml ()
 Override Zend_Feed_Element to allow formated feeds.
 
 send ()
 Send feed to a http client with the correct header.
 
- Public Member Functions inherited from Zend_Feed_Abstract
 __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

 _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.
 
- Protected Member Functions inherited from Zend_Feed_Abstract
 _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

 $_entryClassName = 'Zend_Feed_Entry_Atom'
 
 $_entryElementName = 'entry'
 
 $_defaultNamespace = 'atom'
 
- Protected Attributes inherited from Zend_Feed_Abstract
 $_entryIndex = 0
 
 $_entries
 
- Protected Attributes inherited from Zend_Feed_Element
 $_element
 
 $_encoding = 'UTF-8'
 
 $_parentElement
 
 $_appended = true
 

Member Function Documentation

__get (   $var)

Make accessing some individual elements of the feed easier.

Special accessors 'entry' and 'entries' are provided so that if you wish to iterate over an Atom feed's entries, you can do so using foreach ($feed->entries as $entry) or foreach ($feed->entry as $entry).

Parameters
string$varThe property to access.
Returns
mixed
__wakeup ( )

Override Zend_Feed_Abstract to set up the $_element and $_entries aliases.

Returns
void
Exceptions
Zend_Feed_Exception
See Also
Zend_Feed_Exception
_mapFeedEntries ( DOMElement  $root,
  $array 
)
protected

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

The following nodes are constructed for each feed entry <entry> <id>url to feed entry</id> <title>entry title</title> <updated>last update</updated> <link rel="alternate" href="url to feed entry">

short text

<content>long version, can contain html</content> </entry>

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

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

Parameters
array$arraythe data to use
Returns
DOMElement root node
link (   $rel = null)

Easy access to <link> tags keyed by "rel" attributes.

If $elt->link() is called with no arguments, we will attempt to return the value of the <link> tag(s) like all other method-syntax attribute access. If an argument is passed to link(), however, then we will return the "href" value of the first <link> tag that has a "rel" attribute matching $rel:

$elt->link(): returns the value of the link tag. $elt->link('self'): returns the href from the first <link rel="self"> in the entry.

Parameters
string$relThe "rel" attribute to look for.
Returns
mixed
saveXml ( )

Override Zend_Feed_Element to allow formated feeds.

Returns
string
send ( )

Send feed to a http client with the correct header.

Returns
void
Exceptions
Zend_Feed_Exceptionif headers have already been sent
See Also
Zend_Feed_Exception

Member Data Documentation

$_defaultNamespace = 'atom'
protected
$_entryClassName = 'Zend_Feed_Entry_Atom'
protected
$_entryElementName = 'entry'
protected