parser/AbstractSAXParser.php
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
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
Methods


characters(
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.
Name | Type | Description |
---|---|---|
$parser | resource | php's internal parser handle. |
$data | string | the CDATA |
Exception | Description |
---|---|
\Exception | - Exceptions may be thrown by the Handler |


endElement(
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.
Name | Type | Description |
---|---|---|
$parser | object | the php's internal parser handle |
$name | string | the closing tag name |
Exception | Description |
---|---|
\Exception | - Exceptions may be thrown by the Handler |


parse(
)
:
void
Entrypoint for parser. This method needs to be implemented by the child classt that utilizes the concrete parser


parserSetOption(
$opt, $val
)
:
void
Sets options for PHP interal parser. Must be implemented by the parser class if it should be used.
Name | Type | Description |
---|---|---|
$opt | ||
$val |


setHandler(
\AbstractHandler $obj
)
:
void
Sets the current element handler object for this parser. Usually this is an object using extending "AbstractHandler".
Name | Type | Description |
---|---|---|
$obj | \AbstractHandler | The handler object. |


startElement(
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.
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 |
Exception | Description |
---|---|
\Exception | - Exceptions may be thrown by the Handler |