Dotclear 2.26
Loading...
Searching...
No Matches
feedParser Class Reference

Feed parser. More...

Public Member Functions

 __construct (string $data)
 

Data Fields

 $feed_type
 
 $title
 
 $link
 
 $description
 
 $pubdate
 
 $generator
 
 $items = []
 

Protected Member Functions

 parseRSSRDF ()
 
 parseRSS ()
 
 parseAtom03 ()
 
 parseAtom10 ()
 
 nodes2array (SimpleXMLElement &$node)
 

Protected Attributes

 $xml
 

Detailed Description

Feed parser.

This class can read RSS 1.0, RSS 2.0, Atom 0.3 and Atom 1.0 feeds. Works with feedReader

Constructor & Destructor Documentation

◆ __construct()

__construct ( string  $data)

Constructor.

Takes some $data as input. Returns false if data is not a valid XML stream. If everything's fine, feed is parsed and items are in $items property.

Parameters
string$dataXML stream

References parseAtom03(), parseAtom10(), parseRSS(), and parseRSSRDF().

Member Function Documentation

◆ parseRSSRDF()

parseRSSRDF ( )
protected

RSS 1.0 parser.

References $generator, if, and nodes2array().

Referenced by __construct().

◆ parseRSS()

parseRSS ( )
protected

RSS 2.0 parser

References if, and nodes2array().

Referenced by __construct().

◆ parseAtom03()

parseAtom03 ( )
protected

Atom 0.3 parser

References $link, and nodes2array().

Referenced by __construct().

◆ parseAtom10()

parseAtom10 ( )
protected

Atom 1.0 parser

References $link, and nodes2array().

Referenced by __construct().

◆ nodes2array()

nodes2array ( SimpleXMLElement &  $node)
protected

SimpleXML to array

Converts a SimpleXMLElement to an array.

Parameters
SimpleXMLElement$nodeSimpleXML Node
Returns
array

Referenced by parseAtom03(), parseAtom10(), parseRSS(), and parseRSSRDF().

Field Documentation

◆ $feed_type

$feed_type

◆ $title

$title

◆ $link

$link

Referenced by parseAtom03(), and parseAtom10().

◆ $description

$description

◆ $pubdate

$pubdate

◆ $generator

$generator

Referenced by parseRSSRDF().

◆ $items

$items = []

◆ $xml

$xml
protected

The documentation for this class was generated from the following file: