# 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: cec68a6f68780eca738576344b5efb3521be5ded $
package | phing.parser

### Methods

## 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)

### Arguments

#### $project

`\Project`

the Project instance this configurator should use

#### $buildFile

`\PhingFile`

the buildfile object the parser should use

## _parse

    _parse(\PhingXMLContext $ctx)

throws |

### Arguments

#### $ctx

`\PhingXMLContext`

## Configures the #CDATA of an element.

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

static

### Arguments

#### $project

``

#### $target

``

#### $text

``

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

    configureId( $target,  $attr)

### Arguments

#### $target

``

#### $attr

``

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

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

static

### Arguments

#### $project

`\Project`

the Project instance this configurator should use

#### $buildFile

`\PhingFile`

the buildfile object the parser should use

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

    delayTaskUntilParseEnd(\Task $task)

### Arguments

#### $task

`\Task`

Task to execute after parse

## find out the build file

    getBuildFile() : \PhingFile

### Response

`\PhingFile`

the build file to which the xml context belongs

## find out the parent build file of this build file

    getBuildFileParent() : \PhingFile

### Response

`\PhingFile`

the parent build file of this build file

## find out the current project name

    getCurrentProjectName() : string

### Response

`string`

current project name

## tells whether the project tag is being ignored

    isIgnoringProjectTag() : boolean

### Response

`boolean`

whether the project tag is being ignored

## isParsing

    isParsing() : boolean

### Response

`boolean`

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

    parse()

throws | if there is any kind of execption during the parsing process

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

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

static

### Arguments

#### $project

`object|\Project`

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) : string

static

This method makes use of a static variable to hold the

### Arguments

#### $matches

``

### Response

`string`

## set the name of the current project

    setCurrentProjectName(string $name)

### Arguments

#### $name

`string`

name of the current project

## sets the flag to ignore the project tag

    setIgnoreProjectTag(boolean $flag)

### Arguments

#### $flag

`boolean`

flag to ignore the project tag

## Stores a configured child element into its parent object

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

static

### Arguments

#### $project

``

#### $parent

``

#### $child

``

#### $tag

``

### Properties

## project

    project :

### Type(s)

``

## locator

    locator :

### Type(s)

``

## buildFile

    buildFile :

### Type(s)

``

## buildFileParent

    buildFileParent :

### Type(s)

``

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

    parseEndTarget :

### Type(s)

``

## Name of the current project

    currentProjectName :

### Type(s)

``

## isParsing

    isParsing :

### Type(s)

``

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

    ignoreProjectTag :

### Type(s)

``

## propReplaceProject

    propReplaceProject :

static

### Type(s)

``

## propReplaceProperties

    propReplaceProperties :

static

### Type(s)

``

## propReplaceLogLevel

    propReplaceLogLevel :

static

### Type(s)

``