classes/phing/parser/ProjectConfigurator.php

\ProjectConfigurator

The datatype handler class.

This class handles the occurance of registered datatype tags like FileSet

access
public
author
Andreas Aderhold
copyright
2001,2002 THYRELL. All rights reserved
package
phing.parser
version
$Revision: 1000 $ $Date: 2010-11-24 11:28:55 +0100 (wo, 24 nov 2010) $

Properties

Propertypublic  $buildFile= ''
Details
Type
Propertypublic  $buildFileParent= ''
Details
Type
Propertyprivate  $currentProjectName= ''

Name of the current project

Details
Type
Propertyprivate  $currentTargets= ''

Targets in current file

Details
Type
Propertyprivate  $ignoreProjectTag= 'false'

Indicates whether the project tag attributes are to be ignored when processing a particular build file.

Default valuefalseDetails
Type
Propertyprivate  $isParsing= 'true'
Default valuetrueDetails
Type
Propertypublic  $locator= ''
Details
Type
Propertyprivate  $parseEndTarget= ''

Synthetic target that will be called at the end to the parse phase

Details
Type
Propertypublic  $project= ''
Details
Type
Propertyprivate  $propReplaceProject= ''
static
Details
Type
Propertyprivate  $propReplaceProperties= ''
static
Details
Type

Methods

methodpublic  __construct( object $project, object $buildFile ) :
Constructs a new ProjectConfigurator object This constructor is private. Use a static call to configureProject to configure a project.
Parameters
Name Type Description
$project object the Project instance this configurator should use
$buildFile object the buildfile object the parser should use
Details
access
private
methodpublic  addText( object $project, object $target, string $text = null ) :
staticConfigures the #CDATA of an element.
Parameters
Name Type Description
$project object the project this element belongs to
$target object the element to configure
$text string

the element's #CDATA

Details
access
public
methodpublic  configure( object $target, array $attrs, object $project ) :
staticConfigures an element and resolves eventually given properties.
Parameters
Name Type Description
$target object the element to configure
$attrs array

the element's attributes

$project object the project this element belongs to
Details
access
public
throws
if arguments are not valid
throws
if attributes can not be configured
methodpublic  configureId( object $target, array $attr ) :
Scan Attributes for the id attribute and maybe add a reference to project.
Parameters
Name Type Description
$target object

the element's object

$attr array

the element's attributes

methodpublic  configureProject( object $project, object $buildFile ) :
staticStatic call to ProjectConfigurator. Use this to configure a project. Do not use the new operator.
Parameters
Name Type Description
$project object the Project instance this configurator should use
$buildFile object the buildfile object the parser should use
Details
access
public
methodpublic  delayTaskUntilParseEnd( \Task $task ) :
Delay execution of a task until after the current parse phase has completed.
Parameters
Name Type Description
$task \Task Task to execute after parse
methodpublic  getBuildFile( ) : \the
find out the build file
Returns
Type Description
\the
methodpublic  getBuildFileParent( ) : \the
find out the parent build file of this build file
Returns
Type Description
\the
methodpublic  getCurrentProjectName( ) : \current
find out the current project name
Returns
Type Description
\current
methodpublic  getCurrentTargets( ) :
methodpublic  isIgnoringProjectTag( ) : \whether
tells whether the project tag is being ignored
Returns
Type Description
\whether
methodpublic  isParsing( ) :
methodprotected  parse( ) :
Creates the ExpatParser, sets root handler and kick off parsing process.
Details
access
private
throws
if there is any kind of execption during the parsing process
methodpublic  replaceProperties( object $project, string $value, array $keys ) : string
staticReplace ${} style constructions in the given value with the string value of the corresponding data types. This method is static.
Parameters
Name Type Description
$project object

the project that should be used for property look-ups

$value string the string to be scanned for property references
$keys array proeprty keys
Returns
Type Description
string
methodprivate  replacePropertyCallback(  $matches ) :
staticPrivate [static] function for use by preg_replace_callback to replace a single param.

This method makes use of a static variable to hold the

Parameters
Name Type Description
$matches
methodpublic  setCurrentProjectName( \name $name ) :
set the name of the current project
Parameters
Name Type Description
$name \name name of the current project
methodpublic  setIgnoreProjectTag( \flag $flag ) :
sets the flag to ignore the project tag
Parameters
Name Type Description
$flag \flag to ignore the project tag
methodpublic  storeChild( object $project, object $parent, object $child, string $tag ) :
staticStores a configured child element into its parent object
Parameters
Name Type Description
$project object the project this element belongs to
$parent object the parent element
$child object the child element
$tag string the XML tagname
Details
access
public
Documentation was generated by DocBlox 0.13.1.