PHP Class Jonah_FeedParser, horde

Copyright 2000-2016 Horde LLC (http://www.horde.org/) This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
Deprecation: Will be removed once the Aggregator app (Hippo) is started.
Author: Chuck Hagenbuch ([email protected])
Afficher le fichier Open project: horde/horde Class Usage Examples

Méthodes publiques

Свойство Type Description
$channel array All the attributes of the channel description.
$charset string Feed charset.
$child string The current child tag - TITLE, DESCRIPTION, URL, etc.
$error string Error string.
$format string What kind of feed are we parsing?
$image array All the attributes of the channel image.
$item array All the attributes of the current item being parsed.
$parent string The current parent tag - CHANNEL, STORY, etc.
$parser resource XML parser resource.
$story array All the attributes of the current story being parsed.
$structure array The array that all the parsed information gets dumped into.

Méthodes publiques

Méthode Description
Jonah_FeedParser ( $charset ) Constructs a new Jonah_FeedParser parser object.
characterData ( $parser, $data ) The handler for character data encountered in the XML file.
cleanup ( ) Clean up any existing data - reset to a state where we can cleanly open a new file.
defaultHandler ( $parser, $data ) Handles things that we don't recognize. A no-op.
endElement ( $parser, $name ) Handle the ends of XML elements - wrap up whatever we've been putting together and store it for safekeeping.
init ( ) Initialize the XML parser.
parse ( $data ) Actually do the parsing. Separated from the constructor just in case you want to set any other options on the parser, load initial data, whatever.
startElement ( $parser, $name, $attribs ) Start collecting data about a new element.

Method Details

Jonah_FeedParser() public méthode

Constructs a new Jonah_FeedParser parser object.
public Jonah_FeedParser ( $charset )

characterData() public méthode

The handler for character data encountered in the XML file.
public characterData ( $parser, $data )

cleanup() public méthode

Clean up any existing data - reset to a state where we can cleanly open a new file.
public cleanup ( )

defaultHandler() public méthode

Handles things that we don't recognize. A no-op.
public defaultHandler ( $parser, $data )

endElement() public méthode

Handle the ends of XML elements - wrap up whatever we've been putting together and store it for safekeeping.
public endElement ( $parser, $name )

init() public méthode

Initialize the XML parser.
public init ( )

parse() public méthode

Actually do the parsing. Separated from the constructor just in case you want to set any other options on the parser, load initial data, whatever.
public parse ( $data )
$data The XML feed data to parse.

startElement() public méthode

Start collecting data about a new element.
public startElement ( $parser, $name, $attribs )

Property Details

$channel public_oe property

All the attributes of the channel description.
public array $channel
Résultat array

$charset public_oe property

Feed charset.
public string $charset
Résultat string

$child public_oe property

The current child tag - TITLE, DESCRIPTION, URL, etc.
public string $child
Résultat string

$error public_oe property

Error string.
public string $error
Résultat string

$format public_oe property

What kind of feed are we parsing?
public string $format
Résultat string

$image public_oe property

All the attributes of the channel image.
public array $image
Résultat array

$item public_oe property

All the attributes of the current item being parsed.
public array $item
Résultat array

$parent public_oe property

The current parent tag - CHANNEL, STORY, etc.
public string $parent
Résultat string

$parser public_oe property

XML parser resource.
public resource $parser
Résultat resource

$story public_oe property

All the attributes of the current story being parsed.
public array $story
Résultat array

$structure public_oe property

The array that all the parsed information gets dumped into.
public array $structure
Résultat array