ProjectConfigurator

The datatype handler class.

This class handles the occurance of registered datatype tags like FileSet

author

Andreas Aderhold andi@binarycloud.com

copyright

2001,2002 THYRELL. All rights reserved

version

$Id: ae9b63bef4c1423d88bb36ddfc5196763828123e $

access

public

package

phing.parser

Methods

Static call to ProjectConfigurator. Use this to configure a project. Do not use the new operator.

configureProject(\Project $project, \PhingFile $buildFile) 
static
access

public

Arguments

$project

\Project

$buildFile

\PhingFile

Constructs a new ProjectConfigurator object This constructor is private. Use a static call to <code>configureProject</code> to configure a project.

__construct(\Project $project, \PhingFile $buildFile) 
access

private

Arguments

$project

\Project

$buildFile

\PhingFile

find out the build file

getBuildFile() : \the

Response

\the

build file to which the xml context belongs

find out the parent build file of this build file

getBuildFileParent() : \the

Response

\the

parent build file of this build file

find out the current project name

getCurrentProjectName() : \current

Response

\current

project name

set the name of the current project

setCurrentProjectName($name) 

Arguments

$name

tells whether the project tag is being ignored

isIgnoringProjectTag() : \whether

Response

\whether

the project tag is being ignored

sets the flag to ignore the project tag

setIgnoreProjectTag($flag) 

Arguments

$flag

getCurrentTargets

getCurrentTargets() 

isParsing

isParsing() 

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

parse() 
throws

if there is any kind of execption during the parsing process

access

private

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

delayTaskUntilParseEnd(\Task $task) 

Arguments

$task

\Task

Task to execute after parse

Configures an element and resolves eventually given properties.

configure($target, $attrs, \Project $project) 
static
throws

if arguments are not valid

if attributes can not be configured

access

public

Arguments

$target

$attrs

$project

\Project

Configures the #CDATA of an element.

addText($project, $target, $text = null) 
static
access

public

Arguments

$project

$target

$text

Stores a configured child element into its parent object

storeChild($project, $parent, $child, $tag) 
static
access

public

Arguments

$project

$parent

$child

$tag

Replace ${} style constructions in the given value with the string value of the corresponding data types. This method is static.

replaceProperties(object $project, string $value, array $keys, integer $logLevel = \Project::MSG_VERBOSE) : string
static

Arguments

$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

Response

string

the replaced string or null if the string itself was null

Private [static] function for use by preg_replace_callback to replace a single param.

replacePropertyCallback($matches) 
static

This method makes use of a static variable to hold the

Arguments

$matches

Scan Attributes for the id attribute and maybe add a reference to project.

configureId($target, $attr) 

Arguments

$target

$attr

Properties

project

project : 

locator

locator : 

buildFile

buildFile : 

buildFileParent

buildFileParent : 

Targets in current file

currentTargets : 

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

parseEndTarget : 

Name of the current project

currentProjectName : 

isParsing

isParsing : 

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

ignoreProjectTag : 

propReplaceProject

propReplaceProject : 
static

propReplaceProperties

propReplaceProperties : 
static

propReplaceLogLevel

propReplaceLogLevel : 
static