Class xml_domit_rss_base
The base class of all DOMIT! RSS objects.

isPublic? no
isAbstract? yes

Inheritance tree:

xml_domit_rss_base (top level class)

Known subclasses:

xml_domit_rss_elementindexer

Source file: xml_domit_rss_shared.php




Constructor



Public Constants



Private Constants



Public Fields



Private Fields
node
A reference to the DOMIT! node underlying the DOMIT! RSS element.

Type: DOMIT_Node

rssDefinedElements
A list of valid RSS defined child elements.

Type: array




Public Methods
hasAttribute
Checks whether the named attribute exists.

Signature: hasAttribute($attr)

Parameters:

String attr - The attribute name.

Returns:

boolean - True if the attribute exists.

Example:

Tests whether the named attribute exists.

$doesTitleExist = $someRSSElement->hasAttribute('title');

isRSSDefined
Tests whether the named element is predefined by the RSS spec.

Signature: isRSSDefined($elementName)

Parameters:

String attr - The element name.

Returns:

boolean - True if the element is predefined by the RSS spec.

Example:

Tests whether the named element is predefined by the RSS spec.

$isRSS = $channelElement->isRSSDefined('title');

isSimpleRSSElement
Tests whether the named element has a single child text node.

Signature: isSimpleRSSElement($elementName)

Parameters:

String attr - The element name.

Returns:

boolean - True if the named element has a single child text node.

Example:

Tests whether the named element has a single child text node.

$isSimple = $channelElement->isSimpleRSSElement('copyright');

toString
Generates an unformatted (single line, no whitespace) string representation of the rss element or document and all children.

Signature: toString($htmlSafe = false, $subEntities=false)

Parameters:

boolean htmlSafe - If true, returns an html formatted representation of the string.

boolean subEntities - True if illegal xml characters in text nodes and attributes should be converted to entities.

Returns:

String - An unformatted (single line, no whitespace) string representation of the document and all children.

Example:

An unformatted string representation of the rss document will be printed here:

echo $myRSSDoc->toString(true);




Private Methods
getNode
Retrieves the underlying DOMIT! node underlying the DOMIT! RSS element.

Signature: getNode()

Returns:

DOMIT_Node - The underlying DOMIT node.

Example:

Gets the underlying DOMIT node.

$domitNode =& $someRSSElement->getNode();

getAttribute
Retrieves the text of the named attribute, checking first if the attribute exists.

Signature: getAttribute($attr)

Parameters:

String attr - The attribute name.

Returns:

String - The attribute value, or an empty string.

toNormalizedString
Returns a readable representation of the current rss document or element.

Signature: toNormalizedString ($subEntities=false, $definedEntities)

Parameters:

boolean subEntities - True if entity substitution is to be performed.

Array definedEntities - A user defined translation table of entities and their replacement values.

Returns:

String - A readable representation of the current rss document or element.

Example:

A formatted string representation of the rss document will be printed here:

echo $myRSSDoc->toNormalizedString(true);


Documentation generated by ClassyDoc, using the DOMIT! and SAXY parsers.
Please visit Engage Interactive to download free copies.