parser/TaskHandler.php

Show: inherited
Table of Contents

The task handler class.

This class handles the occurance of a tag and it's possible nested tags (datatypes and tasks) that may be unknown off bat and are initialized on the fly.

Author
Andreas Aderhold  
Copyright
2001,2002 THYRELL. All rights reserved  
Package
phing.parser  
Version
$Id: 3b31bb3e2c1ae122411833c67617e7cebf6967b8 $  

\TaskHandler

Package: phing\parser

The task handler class.

This class handles the occurance of a tag and it's possible nested tags (datatypes and tasks) that may be unknown off bat and are initialized on the fly.

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

Properties

Propertyprivate\ProjectConfigurator  $configurator= ''

The phing project configurator object

Details
Type
\ProjectConfigurator
Propertyprivateobject  $container= ''

Reference to the target object that represents the currently parsed target. This must not necessarily be a target, hence extra variable.

the target instance
Details
Type
object
Propertypublic  $parentHandler= 'null'
inheritedInherited from: \AbstractHandler::$$parentHandler
Default valuenullDetails
Type
n/a
Inherited_from
\AbstractHandler::$$parentHandler  
Propertyprivate\RuntimeConfigurable  $parentWrapper= ''

Wrapper for the parent element, if any. The wrapper for this element will be added to this wrapper as a child.

Details
Type
\RuntimeConfigurable
Propertypublic  $parser= 'null'
inheritedInherited from: \AbstractHandler::$$parser
Default valuenullDetails
Type
n/a
Inherited_from
\AbstractHandler::$$parser  
Propertyprivateobject  $target= ''

Reference to the target object that contains the currently parsed task

the target instance
Details
Type
object
Propertyprivate\Task  $task= ''

Reference to the task object that represents the currently parsed target.

Details
Type
\Task
Propertyprivate  $wrapper= ''

Wrapper for this element which takes care of actually configuring the element, if this element is contained within a target.

Otherwise the configuration is performed with the configure method.

Details
Type
n/a
See
\ProjectHelper::configure(Object,AttributeList,Project)  

Methods

methodpublic__construct( \AbstractSAXParser $parser, object $parentHandler, \ProjectConfigurator $configurator, \TaskContainer $container = null, \RuntimeConfigurable $parentWrapper = null, \Target $target = null ) : void

Constructs a new TaskHandler and sets up everything.

The constructor must be called by all derived classes.

Parameters
Name Type Description
$parser \AbstractSAXParser

The ExpatParser object

$parentHandler object

The parent handler that invoked this handler

$configurator \ProjectConfigurator
$container \TaskContainer

The container object this task is contained in (null for top-level tasks).

$parentWrapper \RuntimeConfigurable

Wrapper for the parent element, if any.

$target \Target

The target object this task is contained in (null for top-level tasks).

methodpubliccharacters( string $data ) : void

Handles character data.

Parameters
Name Type Description
$data string

The CDATA that comes in

methodpublicendElement( 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

methodprotectedfinished( ) : void

Executes the task at once if it's directly beneath the tag.

methodpublicinit( string $tag, array $attrs ) : void

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

<

p> This includes:

  • creation of the task object
  • calling the setters for attributes
  • adding the task to the container object
  • adding a reference to the task (if id attribute is given)
  • executing the task if the container is the <project> element
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
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

Documentation was generated by DocBlox 0.18.1.