Documentation

Jonah_FeedParser
in package

Jonah_FeedParser.

Copyright 2000-2017 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.

Tags
deprecated

Will be removed once the Aggregator app (Hippo) is started.

author

Chuck Hagenbuch chuck@horde.org

Table of Contents

$channel  : array<string|int, mixed>
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<string|int, mixed>
All the attributes of the channel image.
$item  : array<string|int, mixed>
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<string|int, mixed>
All the attributes of the current story being parsed.
$structure  : array<string|int, mixed>
The array that all the parsed information gets dumped into.
characterData()  : mixed
The handler for character data encountered in the XML file.
cleanup()  : mixed
Clean up any existing data - reset to a state where we can cleanly open a new file.
defaultHandler()  : mixed
Handles things that we don't recognize. A no-op.
endElement()  : mixed
Handle the ends of XML elements - wrap up whatever we've been putting together and store it for safekeeping.
init()  : mixed
Initialize the XML parser.
Jonah_FeedParser()  : mixed
Constructs a new Jonah_FeedParser parser object.
parse()  : mixed
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()  : mixed
Start collecting data about a new element.

Properties

$channel

All the attributes of the channel description.

public array<string|int, mixed> $channel

$child

The current child tag - TITLE, DESCRIPTION, URL, etc.

public string $child = ''

$format

What kind of feed are we parsing?

public string $format = 'rss'

$image

All the attributes of the channel image.

public array<string|int, mixed> $image

$item

All the attributes of the current item being parsed.

public array<string|int, mixed> $item

$parent

The current parent tag - CHANNEL, STORY, etc.

public string $parent = ''

$parser

XML parser resource.

public resource $parser

$story

All the attributes of the current story being parsed.

public array<string|int, mixed> $story

$structure

The array that all the parsed information gets dumped into.

public array<string|int, mixed> $structure

Methods

characterData()

The handler for character data encountered in the XML file.

public characterData(mixed $parser, mixed $data) : mixed
Parameters
$parser : mixed
$data : mixed
Return values
mixed

cleanup()

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

public cleanup() : mixed
Return values
mixed

defaultHandler()

Handles things that we don't recognize. A no-op.

public defaultHandler(mixed $parser, mixed $data) : mixed
Parameters
$parser : mixed
$data : mixed
Return values
mixed

endElement()

Handle the ends of XML elements - wrap up whatever we've been putting together and store it for safekeeping.

public endElement(mixed $parser, mixed $name) : mixed
Parameters
$parser : mixed
$name : mixed
Return values
mixed

init()

Initialize the XML parser.

public init() : mixed
Return values
mixed

Jonah_FeedParser()

Constructs a new Jonah_FeedParser parser object.

public Jonah_FeedParser(mixed $charset) : mixed
Parameters
$charset : mixed
Return values
mixed

parse()

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) : mixed
Parameters
$data :

The XML feed data to parse.

Return values
mixed

startElement()

Start collecting data about a new element.

public startElement(mixed $parser, mixed $name, mixed $attribs) : mixed
Parameters
$parser : mixed
$name : mixed
$attribs : mixed
Return values
mixed

Search results