Zend Framework  3.0
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
AbstractFeed Class Reference

Public Member Functions

 __construct (DOMDocument $domDocument, $type=null)
 Constructor.
 
 setOriginalSourceUri ($uri)
 Set an original source URI for the feed being parsed.
 
 getOriginalSourceUri ()
 Get an original source URI for the feed being parsed.
 
 count ()
 Get the number of feed entries.
 
 current ()
 Return the current entry.
 
 getDomDocument ()
 Get the DOM.
 
 getEncoding ()
 Get the Feed's encoding.
 
 saveXml ()
 Get feed as xml.
 
 getElement ()
 Get the DOMElement representing the items/feed element.
 
 getXpath ()
 Get the DOMXPath object for this feed.
 
 getType ()
 Get the feed type.
 
 key ()
 Return the current feed key.
 
 next ()
 Move the feed pointer forward.
 
 rewind ()
 Reset the pointer in the feed object.
 
 valid ()
 Check to see if the iterator is still valid.
 
 getExtensions ()
 
 __call ($method, $args)
 
 getExtension ($name)
 Return an Extension object with the matching name (postfixed with _Feed)
 
- Public Member Functions inherited from FeedInterface
 getAuthor ($index=0)
 Get a single author.
 
 getAuthors ()
 Get an array with feed authors.
 
 getCopyright ()
 Get the copyright entry.
 
 getDateCreated ()
 Get the feed creation date.
 
 getDateModified ()
 Get the feed modification date.
 
 getDescription ()
 Get the feed description.
 
 getGenerator ()
 Get the feed generator entry.
 
 getId ()
 Get the feed ID.
 
 getLanguage ()
 Get the feed language.
 
 getLink ()
 Get a link to the HTML source.
 
 getFeedLink ()
 Get a link to the XML feed.
 
 getTitle ()
 Get the feed title.
 
 getCategories ()
 Get all categories.
 

Protected Member Functions

 loadExtensions ()
 
 indexEntries ()
 Read all entries to the internal entries array.
 
 registerNamespaces ()
 Register the default namespaces for the current feed format.
 

Protected Attributes

 $data = []
 
 $domDocument = null
 
 $entries = []
 
 $entriesKey = 0
 
 $xpath = null
 
 $extensions = []
 
 $originalSourceUri = null
 

Constructor & Destructor Documentation

__construct ( DOMDocument  $domDocument,
  $type = null 
)

Constructor.

Parameters
DOMDocument$domDocumentThe DOM object for the feed's XML
string$typeFeed type

Member Function Documentation

__call (   $method,
  $args 
)
count ( )

Get the number of feed entries.

Required by the Iterator interface.

Returns
int
current ( )

Return the current entry.

Returns
getDomDocument ( )

Get the DOM.

Returns
DOMDocument
getElement ( )

Get the DOMElement representing the items/feed element.

Returns
DOMElement
getEncoding ( )

Get the Feed's encoding.

Returns
string
getExtension (   $name)

Return an Extension object with the matching name (postfixed with _Feed)

Parameters
string$name
Returns
getExtensions ( )
getOriginalSourceUri ( )

Get an original source URI for the feed being parsed.

Returns null if unset or the feed was not imported from a URI.

Returns
string|null
getType ( )

Get the feed type.

Returns
string
getXpath ( )

Get the DOMXPath object for this feed.

Returns
DOMXPath
indexEntries ( )
abstractprotected

Read all entries to the internal entries array.

key ( )

Return the current feed key.

Returns
int
loadExtensions ( )
protected
next ( )

Move the feed pointer forward.

registerNamespaces ( )
abstractprotected

Register the default namespaces for the current feed format.

rewind ( )

Reset the pointer in the feed object.

saveXml ( )

Get feed as xml.

Returns
string
setOriginalSourceUri (   $uri)

Set an original source URI for the feed being parsed.

This value is returned from getFeedLink() method if the feed does not carry a self-referencing URI.

Parameters
string$uri
valid ( )

Check to see if the iterator is still valid.

Returns
bool

Member Data Documentation

$data = []
protected
$domDocument = null
protected
$entries = []
protected
$entriesKey = 0
protected
$extensions = []
protected
$originalSourceUri = null
protected
$xpath = null
protected