PHP Class DataTypeHandler, symfony-1.4

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

Author: Andreas Aderhold ([email protected])
Inheritance: extends AbstractHandler
Mostra file Open project: vjousse/symfony-1.4 Class Usage Examples

Public Methods

Method Description
__construct ( AbstractSAXParser $parser, AbstractHandler $parentHandler, ProjectConfigurator $configurator, Target $target = null ) Constructs a new DataTypeHandler and sets up everything.
characters ( $data ) Handles character data.
endElement ( $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.
init ( $propType, $attrs ) Executes initialization actions required to setup the data structures related to the tag.
startElement ( $name, $attrs ) Checks for nested tags within the current one. Creates and calls handlers respectively.

Method Details

__construct() public method

Constructs a new DataTypeHandler and sets up everything.
public __construct ( AbstractSAXParser $parser, AbstractHandler $parentHandler, ProjectConfigurator $configurator, Target $target = null )
$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).

characters() public method

Handles character data.
public characters ( $data )

endElement() public method

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.
public endElement ( $name ) : void
return void

init() public method

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)
public init ( $propType, $attrs )

startElement() public method

Checks for nested tags within the current one. Creates and calls handlers respectively.
public startElement ( $name, $attrs )