parser/DataTypeHandler.php

Show: inherited
Table of Contents

Configures a Project (complete with Targets and Tasks) based on a XML build file.

<

p> Design/ZE2 migration note: If PHP would support nested classes. All the phing/parser/*Filter classes would be nested within this class

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

\DataTypeHandler

Package: phing\parser

Configures a Project (complete with Targets and Tasks) based on a XML build file.

<

p> Design/ZE2 migration note: If PHP would support nested classes. All the phing/parser/*Filter classes would be nested within this class

Parent(s)
\AbstractHandler
Access
public  
Author
Andreas Aderhold  
Copyright
2001,2002 THYRELL. All rights reserved  
Version
$Id$  

Properties

Propertyprivate  $element= ''
Details
Type
n/a
Propertypublic  $parentHandler= 'null'
inheritedInherited from: \AbstractHandler::$$parentHandler
Default valuenullDetails
Type
n/a
Inherited_from
\AbstractHandler::$$parentHandler  
Propertypublic  $parser= 'null'
inheritedInherited from: \AbstractHandler::$$parser
Default valuenullDetails
Type
n/a
Inherited_from
\AbstractHandler::$$parser  
Propertyprivate  $target= ''
Details
Type
n/a
Propertyprivate  $wrapper= ''
Details
Type
n/a

Methods

methodpublic__construct( \AbstractSAXParser $parser, \AbstractHandler $parentHandler, \ProjectConfigurator $configurator, \Target $target = null ) : void

Constructs a new DataTypeHandler and sets up everything.

The constructor must be called by all derived classes.

Parameters
Name Type Description
$parser \AbstractSAXParser

The XML parser (default: ExpatParser)

$parentHandler \AbstractHandler

The parent handler that invoked this handler.

$configurator \ProjectConfigurator

The ProjectConfigurator object

$target \Target

The target object this datatype is contained in (null for top-level datatypes).

methodpubliccharacters( string $data ) : void

Handles character data.

Parameters
Name Type Description
$data string

the CDATA that comes in

Details
Access
public  
methodpublicendElement( string $name ) : void

Overrides endElement for data types. Tells the type handler that processing the element had been finished so handlers know they can perform actions that need to be based on the data contained within the element.

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

methodprotectedfinished( ) : void
inherited

Gets invoked when element closes method.

Inherited from: \AbstractHandler::finished()
methodpublicinit( string $propType, array $attrs ) : void

Executes initialization actions required to setup the data structures related to the tag.

<

p> This includes:

  • creation of the datatype object
  • calling the setters for attributes
  • adding the type to the target object if any
  • adding a reference to the task (if id attribute is given)
Parameters
Name Type Description
$propType 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  
methodpublicstartElement( string $name, array $attrs ) : void

Checks for nested tags within the current one. Creates and calls handlers respectively.

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

Details
Access
public  
Documentation was generated by DocBlox 0.18.1.