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])
파일 보기 프로젝트 열기: horde/horde 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$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