parser/TargetHandler.php

Show: inherited
Table of Contents

The target handler class.

This class handles the occurance of a tag and it's possible nested tags (datatypes and tasks).

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

\TargetHandler

Package: phing\parser

The target handler class.

This class handles the occurance of a tag and it's possible nested tags (datatypes and tasks).

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

Properties

Propertyprivate\ProjectConfigurator  $configurator= ''

The phing project configurator object

Details
Type
\ProjectConfigurator
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  
Propertyprivateobject  $target= ''

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

the target instance
Details
Type
object

Methods

methodpublic__construct( object $parser, object $parentHandler, object $configurator ) : void

Constructs a new TargetHandler

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

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

Checks if this target has dependencies and/or nested tasks.

If the target has neither, show a warning.

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 target object
  • calling the setters for attributes
  • adding the target to the project
  • adding a reference to the target (if id attribute is given)
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.