parser/ProjectConfigurator.php

Show: inherited
Table of Contents

\ProjectConfigurator

Package: phing\parser

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  
Version
$Id: ae9b63bef4c1423d88bb36ddfc5196763828123e $  

Properties

Propertypublic  $buildFile= ''
Details
Type
n/a
Propertypublic  $buildFileParent= ''
Details
Type
n/a
Propertyprivate  $currentProjectName= ''

Name of the current project

Details
Type
n/a
Propertyprivate  $currentTargets= ''

Targets in current file

Details
Type
n/a
Propertyprivate  $ignoreProjectTag= 'false'

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

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

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

Details
Type
n/a
Propertypublic  $project= ''
Details
Type
n/a
Propertyprivate  $propReplaceLogLevel= 'Project::MSG_VERBOSE'
static
Default valueProject::MSG_VERBOSEDetails
Type
n/a
Propertyprivate  $propReplaceProject= ''
static
Details
Type
n/a
Propertyprivate  $propReplaceProperties= ''
static
Details
Type
n/a

Methods

methodpublic__construct( object $project, object $buildFile ) : void

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  
methodpublicaddText( object $project, object $target, string $text = null ) : void
static

Configures 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  
methodpublicconfigure( object $target, array $attrs, object $project ) : void
static

Configures 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

Throws
Exception Description
\Exception if arguments are not valid
\BuildException if attributes can not be configured
Details
Access
public  
methodpublicconfigureId( object $target, array $attr ) : void

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

methodpublicconfigureProject( object $project, object $buildFile ) : void
static

Static 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  
methodpublicdelayTaskUntilParseEnd( \Task $task ) : void

Delay execution of a task until after the current parse phase has completed.

Parameters
Name Type Description
$task \Task

Task to execute after parse

methodpublicgetBuildFile( ) : \the

find out the build file

Returns
Type Description
\the build file to which the xml context belongs
methodpublicgetBuildFileParent( ) : \the

find out the parent build file of this build file

Returns
Type Description
\the parent build file of this build file
methodpublicgetCurrentProjectName( ) : \current

find out the current project name

Returns
Type Description
\current project name
methodpublicgetCurrentTargets( ) : void

methodpublicisIgnoringProjectTag( ) : \whether

tells whether the project tag is being ignored

Returns
Type Description
\whether the project tag is being ignored
methodpublicisParsing( ) : void

methodprotectedparse( ) : void

Creates the ExpatParser, sets root handler and kick off parsing process.

Throws
Exception Description
\BuildException if there is any kind of execption during the parsing process
Details
Access
private  
methodpublicreplaceProperties( object $project, string $value, array $keys, integer $logLevel = Project::MSG_VERBOSE ) : string
static

Replace ${} 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

property keys

$logLevel integer

the level of generated log messages

Returns
Type Description
string the replaced string or <code>null</code> if the string itself was null
methodprivatereplacePropertyCallback(  $matches ) : void
static

Private [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
methodpublicsetCurrentProjectName( \name $name ) : void

set the name of the current project

Parameters
Name Type Description
$name \name

name of the current project

methodpublicsetIgnoreProjectTag( \flag $flag ) : void

sets the flag to ignore the project tag

Parameters
Name Type Description
$flag \flag

to ignore the project tag

methodpublicstoreChild( object $project, object $parent, object $child, string $tag ) : void
static

Stores 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.18.1.