Horde_Feed_Atom extends Horde_Feed_Base
Atom feed class
The Horde_Feed_Atom class is a concrete subclass of the general Horde_Feed_Base class, tailored for representing an Atom feed. It shares all of the same methods with its parent. The distinction is made in the format of data that Horde_Feed_Atom expects, and as a further pointer for users as to what kind of feed object they have been passed.
Tags
Table of Contents
- $_defaultNamespace : string
- The default namespace for Atom feeds.
- $_emptyXml : string
- The XML string for an "empty" Atom feed.
- $_httpClient : Horde_Http_Client
- $_listItemClassName : string
- The classname for individual feed elements.
- $_uri : string
- Our root ("home") URI
- __construct() : mixed
- Feed constructor
- __wakeup() : mixed
- Handle null or array values for $this->_element by initializing with $this->_emptyXml, and importing the array with Horde_Xml_Element::fromArray() if necessary.
- link() : mixed
- Easy access to <link> tags keyed by "rel" attributes.
- _buildListItemCache() : array<string|int, mixed>
- Cache the individual feed elements so they don't need to be searched for on every operation.
Properties
$_defaultNamespace
The default namespace for Atom feeds.
protected
string
$_defaultNamespace
= 'atom'
$_emptyXml
The XML string for an "empty" Atom feed.
protected
string
$_emptyXml
= '<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom"></feed>'
$_httpClient
protected
Horde_Http_Client
$_httpClient
$_listItemClassName
The classname for individual feed elements.
protected
string
$_listItemClassName
= 'Horde_Feed_Entry_Atom'
$_uri
Our root ("home") URI
protected
string
$_uri
Methods
__construct()
Feed constructor
public
__construct([mixed $xml = null ][, string $uri = null ][, Horde_Http_Client $httpClient = null ]) : mixed
The Horde_Feed_Base constructor takes the URI of a feed or a feed represented as a string and loads it as XML.
Parameters
- $xml : mixed = null
-
The feed as a string, a DOMElement, or null.
- $uri : string = null
-
The full URI of the feed, or null if unknown.
- $httpClient : Horde_Http_Client = null
Tags
Return values
mixed —__wakeup()
Handle null or array values for $this->_element by initializing with $this->_emptyXml, and importing the array with Horde_Xml_Element::fromArray() if necessary.
public
__wakeup() : mixed
Tags
Return values
mixed —link()
Easy access to <link> tags keyed by "rel" attributes.
public
link([string $rel = null ]) : mixed
Parameters
- $rel : string = null
-
The "rel" attribute to look for.
Tags
Return values
mixed —_buildListItemCache()
Cache the individual feed elements so they don't need to be searched for on every operation.
protected
_buildListItemCache() : array<string|int, mixed>