# parser/AbstractHandler.php

This is an abstract class all SAX handler classes must extend

Author
  Andreas Aderhold
Copyright
  © 2001,2002 THYRELL. All rights reserved
Package
  phing.parser
Version
  $Revision: 526 $

## \AbstractHandler
jump to top

Package: phing\parser

This is an abstract class all SAX handler classes must extend

Children
  \NestedElementHandler
  \TargetHandler
  \DataTypeHandler
  \TaskHandler
  \ProjectHandler
  \RootHandler
Author
  Andreas Aderhold
Copyright
  © 2001,2002 THYRELL. All rights reserved
Version
  $Revision: 526 $

### Properties

`$parentHandler= 'null'`
Default value `null` Details

Type
  n/a

`$parser= 'null'`
Default value `null` Details

Type
  n/a

### Methods

`__construct( object $parser, object $parentHandler ) : void`

Constructs a SAX handler parser.

The constructor must be called by all derived classes.

Parameters

Name | Type | Description
--- | --- | ---
$parser | object | the parser object
$parentHandler | object | the parent handler of this handler

`characters( string $data ) : void`

Invoked by occurance of #PCDATA.

Parameters

Name | Type | Description
--- | --- | ---
$data | string | the name of the XML element

Details

Access
  public
Exception
  ExpatParserException if there is no CDATA but method was called

`endElement( string $name ) : void`

Gets invoked when a XML element ends.

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

Parameters

Name | Type | Description
--- | --- | ---
$name | string | the name of the XML element

`finished( ) : void`

Gets invoked when element closes method.

`startElement( string $name, array $attribs ) : void`

Gets invoked when a XML open tag occurs

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

Parameters

Name | Type | Description
--- | --- | ---
$name | string | the name of the XML element
$attribs | array | the attributes of the XML element

Documentation was generated by DocBlox 0.17.1.