Class FeedNode

Description

Base class of FeedChannel and FeedItem classes

Contains utility methods to handle attributes and child nodes present in the data structure of a feed. Also used as a helper of a feed rendering process.

Located in /core/xml/feed/FeedNode.class.php (line 46)

PHP2Go
   |
   --FeedNode
Direct descendents
Class Description
Feed Implementation of a feed
FeedChannel Represents a feed channel
FeedItem Represents an item of a feed channel
Variable Summary
array $children
Method Summary
void addChild (FeedNode $Child)
void addElement (string $name, mixed $value)
string buildDate (int $date, string $type, [string $version = NULL])
array getChildren ()
mixed getElement (string $name, [mixed $fallback = NULL])
int parseDate (string|int $date)
void setElement (string $name, mixed $value)
Variables
array $children = array() (line 53)

Node children

Methods
Constructor FeedNode (line 60)

Class constructor

FeedNode FeedNode ()
addChild (line 115)

Adds a child node

void addChild (FeedNode $Child)
addElement (line 97)

Adds a new entry on a composite element

Composite elements are represented as arrays inside feed channels and feed items.

void addElement (string $name, mixed $value)
  • string $name: Element name
  • mixed $value: New element entry
buildDate (line 165)

Builds a date value according with a feed type and version

string buildDate (int $date, string $type, [string $version = NULL])
  • int $date: Timestamp
  • string $type: Feed type
  • string $version: Format version
getChildren (line 106)

Get child nodes

array getChildren ()
getElement (line 71)

Reads the value of a given element

mixed getElement (string $name, [mixed $fallback = NULL])
  • string $name: Element name
  • mixed $fallback: Fallback value (used when element is not found)
parseDate (line 130)

Tries to convert a datetime value to UNIX timestamp

The method is able to convert date strings written in the RFC822 and ISO8601 formats into UNIX timestamp values.

int parseDate (string|int $date)
  • string|int $date: Date string or timestamp
setElement (line 83)

Defines the value of a node's element

void setElement (string $name, mixed $value)
  • string $name: Element name
  • mixed $value: Element value

Redefined in descendants as:

Inherited Methods

Inherited From PHP2Go

PHP2Go::PHP2Go()
PHP2Go::equals()
PHP2Go::generateUniqueId()
PHP2Go::getClassName()
PHP2Go::getConfigVal()
PHP2Go::getLangVal()
PHP2Go::getObjectName()
PHP2Go::getParentName()
PHP2Go::hasDestructor()
PHP2Go::hashCode()
PHP2Go::isA()
PHP2Go::isSubclassOf()
PHP2Go::logError()
PHP2Go::raiseError()
PHP2Go::registerDestructor()
PHP2Go::registerShutdownFunc()
PHP2Go::retrieve()
PHP2Go::store()
PHP2Go::__toString()

Documentation generated on Sun, 07 Oct 2007 19:24:09 -0300 by phpDocumentor 1.3.2