parser/AbstractSAXParser.php

Show: inherited
Table of Contents

The abstract SAX parser class.

This class represents a SAX parser. It is a abstract calss that must be implemented by the real parser that must extend this class

Author
Andreas Aderhold  
Author
Hans Lellelid  
Copyright
2001,2002 THYRELL. All rights reserved  
Package
phing.parser  
Version
$Id$  

\AbstractSAXParser

Package: phing\parser

The abstract SAX parser class.

This class represents a SAX parser. It is a abstract calss that must be implemented by the real parser that must extend this class

Children
\ExpatParser
Author
Andreas Aderhold  
Author
Hans Lellelid  
Copyright
2001,2002 THYRELL. All rights reserved  
Version
$Id$  

Properties

Propertyprotected  $handler= ''

The AbstractHandler object.

Details
Type
n/a

Methods

methodpublic__construct( ) : void

Constructs a SAX parser

methodpubliccharacters( resource $parser, string $data ) : void

Method that gets invoked when the parser runs over CDATA.

This method is called by PHP's internal parser functions and registered in the actual parser implementation.

It gives control to the current active handler object by calling the

characters()

method. That processes the given CDATA.

Parameters
Name Type Description
$parser resource

php's internal parser handle.

$data string

the CDATA

Throws
Exception Description
\Exception - Exceptions may be thrown by the Handler
methodpublicendElement( object $parser, string $name ) : void

Method that gets invoked when the parser runs over a XML close element.

This method is called by PHP's internal parser funcitons and registered in the actual parser implementation.

It gives control to the current active handler object by calling the

endElement()

method.

Parameters
Name Type Description
$parser object

the php's internal parser handle

$name string

the closing tag name

Throws
Exception Description
\Exception - Exceptions may be thrown by the Handler
methodpublicparse( ) : void
abstract

Entrypoint for parser. This method needs to be implemented by the child classt that utilizes the concrete parser

methodpublicparserSetOption(  $opt,  $val ) : void
abstract

Sets options for PHP interal parser. Must be implemented by the parser class if it should be used.

Parameters
Name Type Description
$opt
$val
methodpublicsetHandler( \AbstractHandler $obj ) : void

Sets the current element handler object for this parser. Usually this is an object using extending "AbstractHandler".

Parameters
Name Type Description
$obj \AbstractHandler

The handler object.

methodpublicstartElement( object $parser, string $name, array $attribs ) : void

Method that gets invoked when the parser runs over a XML start element.

This method is called by PHP's internal parser functions and registered in the actual parser implementation. It gives control to the current active handler object by calling the

startElement()

method.

Parameters
Name Type Description
$parser object

the php's internal parser handle

$name string

the open tag name

$attribs array

the tag's attributes if any

Throws
Exception Description
\Exception - Exceptions may be thrown by the Handler
Documentation was generated by DocBlox 0.18.1.