TaskHandler

Extends \AbstractHandler

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 andi@binarycloud.com

copyright

2001,2002 THYRELL. All rights reserved

version

$Id: b6862fa08ac29e45e028e0634ef7435761e10d40 $

package

phing.parser

Methods

Constructs a SAX handler parser.

__construct($parser, $parentHandler) 
inherited

The constructor must be called by all derived classes.

Arguments

$parser

$parentHandler

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

init(string $tag, array $attrs) 

<

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
throws

if attributes are incomplete or invalid

Arguments

$tag

string

The tag that comes in

$attrs

array

Attributes the tag carries

Gets invoked when element closes method.

finished() 
inherited

Invoked by occurance of #PCDATA.

characters($data) 
inherited
exception

ExpatParserException if there is no CDATA but method was called

access

public

Arguments

$data

Gets invoked when a XML open tag occurs

startElement($name, $attribs) 
inherited

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

Arguments

$name

$attribs

Gets invoked when a XML element ends.

endElement($name) 
inherited

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

Arguments

$name

Properties

Reference to the target object that contains the currently parsed task

target : object
var

the target instance

Type(s)

object

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

container : object
var

the target instance

Type(s)

object

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

task : \Task
var

Type(s)

\Task

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

parentWrapper : \RuntimeConfigurable
var

Type(s)

\RuntimeConfigurable

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

wrapper : 

Otherwise the configuration is performed with the configure method.

see

The phing project configurator object

configurator : \ProjectConfigurator
var

Type(s)

\ProjectConfigurator

parentHandler

parentHandler : 
inherited

parser

parser : 
inherited