AbstractHandler

This is an abstract class all SAX handler classes must extend

author

Andreas Aderhold [email protected]

copyright

2001,2002 THYRELL. All rights reserved

version

$Id: 1a12fa6c0c10fe2baab5d3b5945322e31c94bc85 $

package

phing.parser

Methods

Constructs a SAX handler parser.

__construct(\ExpatParser $parser, \AbstractHandler $parentHandler) 

The constructor must be called by all derived classes.

Arguments

$parser

\ExpatParser

the parser object

$parentHandler

\AbstractHandler

the parent handler of this handler

Invoked by occurrence of #PCDATA.

characters(string $data) 
exception

ExpatParseException if there is no CDATA but method was called

Throws
\ExpatParseException

Arguments

$data

string

contents

Gets invoked when a XML element ends.

endElement(string $name) 

Can be overloaded by the child class. But should not. It hands over control to the parentHandler of this.

Arguments

$name

string

the name of the XML element

Gets invoked when element closes method.

finished() 

Gets invoked when a XML open tag occurs

startElement(string $name, array $attribs) 

Must be overloaded by the child class. Throws an ExpatParseException if there is no handler registered for an element.

Throws
\ExpatParseException

Arguments

$name

string

name of the XML element

$attribs

array

attributes of the XML element

Properties

parentHandler

parentHandler : \AbstractHandler
var

Type(s)

\AbstractHandler

parser

parser : \AbstractSAXParser
var

Type(s)

\AbstractSAXParser