XML_Feed_Parser
[ class tree: XML_Feed_Parser ] [ index: XML_Feed_Parser ] [ all elements ]

Class: XML_Feed_Parser_RSS1

Source Location: /XML_Feed_Parser-1.0.1/Parser/RSS1.php

Class Overview

XML_Feed_Parser_Type
   |
   --XML_Feed_Parser_RSS1

This class handles RSS1.0 feeds.


Author(s):

Version:

  • Release: @package_version@

Methods


Child classes:

XML_Feed_Parser_RSS1Element
RSS1 Element class for XML_Feed_Parser

Inherited Variables

Inherited Methods

Class: XML_Feed_Parser_Type

XML_Feed_Parser_Type::addBase()
Determine whether we need to apply our xml:base rules
XML_Feed_Parser_Type::combineBases()
Utility function to help us resolve xml:base values
XML_Feed_Parser_Type::count()
Count occurrences of an element
XML_Feed_Parser_Type::getCategory()
Apply various rules to retrieve category data.
XML_Feed_Parser_Type::getContent()
Get content from RSS feeds (atom has its own implementation)
XML_Feed_Parser_Type::getDate()
Return a date in seconds since epoch.
XML_Feed_Parser_Type::getEntryByOffset()
Get an entry by its position in the feed, starting from zero
XML_Feed_Parser_Type::getSchemaDir()
Get directory holding RNG schemas. Method is based on that found in Contact_AddressBook.
XML_Feed_Parser_Type::getText()
Get a text construct.
XML_Feed_Parser_Type::hasKey()
Checks if this element has a particular child element.
XML_Feed_Parser_Type::processXHTMLAttributes()
Part of our xml:base processing code
XML_Feed_Parser_Type::traverseNode()
Part of our xml:base processing code
XML_Feed_Parser_Type::__call()
Proxy to allow use of element names as method names
XML_Feed_Parser_Type::__get()
Proxy to allow use of element names as attribute names
XML_Feed_Parser_Type::__toString()
Return an XML serialization of the feed, should it be required. Most users however, will already have a serialization that they used when instantiating the object.

Class Details

[line 32]
This class handles RSS1.0 feeds.
  • Todo: Find a Relax NG URI we can use
  • Version: Release: @package_version@
  • Author: James Stewart <james@jystewart.net>


[ Top ]


Method Detail

__construct (Constructor)   [line 120]

XML_Feed_Parser_RSS1 __construct( $model, [bool $strict = false], DOMDocument $xml)

Our constructor does nothing more than its parent.

Overridden in child classes as:

XML_Feed_Parser_RSS1Element::__construct()
Store useful information for later.

Parameters:

DOMDocument   $xml     A DOM object representing the feed
bool   $strict     (optional) $string Whether or not to validate this feed
DOMDocument   $model     

[ Top ]

getAuthor   [line 246]

array|false getAuthor( )

Employs various techniques to identify the author

Dublin Core provides the dc:creator, dc:contributor, and dc:publisher elements for defining authorship in RSS1. We will try each of those in turn in order to simulate the atom author element and will return it as text.


[ Top ]

getEntryById   [line 151]

XML_Feed_Parser_RSS1Element getEntryById( string $id)

Allows retrieval of an entry by ID where the rdf:about attribute is used

This is not really something that will work with RSS1 as it does not have clear restrictions on the global uniqueness of IDs. We will employ the _very_ hit and miss method of selecting entries based on the rdf:about attribute. If DOMXPath::evaluate is available, we also use that to store a reference to the entry in the array used by getEntryByOffset so that method does not have to seek out the entry if it's requested that way.


Parameters:

string   $id     any valid ID.

[ Top ]

getImage   [line 176]

array|false getImage( )

Get details of the image associated with the feed.
  • Return: an array simply containing the child elements

[ Top ]

getLink   [line 266]

string getLink( [ $offset = 0], [ $attribute = 'href'], [ $params = false])

Retrieve a link

In RSS1 a link is a text element but in order to ensure that we resolve URLs properly we have a special function for them.


Parameters:

   $offset     
   $attribute     
   $params     

[ Top ]

getTextInput   [line 206]

array|false getTextInput( )

The textinput element is little used, but in the interests of completeness we will support it.

[ Top ]


Documentation generated on Tue, 09 Jan 2007 10:32:20 -0500 by phpDocumentor 1.3.0. PEAR Logo Copyright © PHP Group 2004.