# parser/ProjectHandler.php

## \ProjectHandler
jump to top

Package: phing\parser

Handler class for the <project> XML element This class handles all elements under the <project> element.

Parent(s)
  \AbstractHandler
Access
  public
Author
  Andreas Aderhold
Copyright
  (c) 2001,2002 THYRELL. All rights reserved
Version
  $Revision: 775 $ $Date: 2010-05-11 15:51:39 +0200 (Tue, 11 May 2010) $

### Properties

`\ProjectConfigurator $configurator= ''`

The phing project configurator object.

Details

Type
  \ProjectConfigurator

`$parentHandler= 'null'`
inherited Inherited from: \AbstractHandler::$$parentHandler
Default value `null` Details

Type
  n/a
Inherited_from
  \AbstractHandler::$$parentHandler

`$parser= 'null'`
inherited Inherited from: \AbstractHandler::$$parser
Default value `null` Details

Type
  n/a
Inherited_from
  \AbstractHandler::$$parser

### Methods

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

Constructs a new ProjectHandler

The constructor must be called by all derived classes.

Parameters

Name | Type | Description
--- | --- | ---
$parser | object | the ExpatParser object
$parentHandler | object | the parent handler that invoked this handler
$configurator | object | the ProjectConfigurator object

Details

Access
  public

`canonicalName( $name ) : void`
static

Parameters

Name | Type | Description
--- | --- | ---
$name |  |

`characters( string $data ) : void`
inherited

Invoked by occurance of #PCDATA.

Inherited from: \AbstractHandler::characters()
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`
inherited

Gets invoked when a XML element ends.

Inherited from: \AbstractHandler::endElement()

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`
inherited

Gets invoked when element closes method.

Inherited from: \AbstractHandler::finished()
`init( string $tag, array $attrs ) : void`

Executes initialization actions required to setup the project. Usually this method handles the attributes of a tag.

Parameters

Name | Type | Description
--- | --- | ---
$tag | string | the tag that comes in
$attrs | array | attributes the tag carries

Throws

Exception | Description
--- | ---
\ExpatParseException | if attributes are incomplete or invalid

Details

Access
  public

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

Handles start elements within the tag by creating and calling the required handlers for the detected element.

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 tag that comes in
$attrs | array | attributes the tag carries

Throws

Exception | Description
--- | ---
\ExpatParseException | if a unxepected element occurs

Details

Access
  public

Documentation was generated by DocBlox 0.17.1.