PHP Класс 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.
Устаревший: Will be removed once the Aggregator app (Hippo) is started.
Автор: Chuck Hagenbuch ([email protected])
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$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.

Открытые методы

Метод Описание
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.

Описание методов

Jonah_FeedParser() публичный Метод

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

characterData() публичный Метод

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

cleanup() публичный Метод

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

defaultHandler() публичный Метод

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

endElement() публичный Метод

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

init() публичный Метод

Initialize the XML parser.
public init ( )

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 )
$data The XML feed data to parse.

startElement() публичный Метод

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

Описание свойств

$channel публичное свойство

All the attributes of the channel description.
public array $channel
Результат array

$charset публичное свойство

Feed charset.
public string $charset
Результат string

$child публичное свойство

The current child tag - TITLE, DESCRIPTION, URL, etc.
public string $child
Результат string

$error публичное свойство

Error string.
public string $error
Результат string

$format публичное свойство

What kind of feed are we parsing?
public string $format
Результат string

$image публичное свойство

All the attributes of the channel image.
public array $image
Результат array

$item публичное свойство

All the attributes of the current item being parsed.
public array $item
Результат array

$parent публичное свойство

The current parent tag - CHANNEL, STORY, etc.
public string $parent
Результат string

$parser публичное свойство

XML parser resource.
public resource $parser
Результат resource

$story публичное свойство

All the attributes of the current story being parsed.
public array $story
Результат array

$structure публичное свойство

The array that all the parsed information gets dumped into.
public array $structure
Результат array