# 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: 4544d510413fa086342da2142bb5bdff386fa91f $
access | public
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)

access | private

### Arguments

#### $project

`\Project`

#### $buildFile

`\PhingFile`

## _parse

    _parse(\PhingXMLContext $ctx)

### Arguments

#### $ctx

`\PhingXMLContext`

## Configures the #CDATA of an element.

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

static

access | public

### Arguments

#### $project

``

#### $target

``

#### $text

``

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

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

access | public

### Arguments

#### $project

`\Project`

#### $buildFile

`\PhingFile`

## 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() : \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

## tells whether the project tag is being ignored

    isIgnoringProjectTag() : \whether

### Response

`\whether`

the project tag is being ignored

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

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

``

## set the name of the current project

    setCurrentProjectName( $name)

### Arguments

#### $name

``

## sets the flag to ignore the project tag

    setIgnoreProjectTag( $flag)

### Arguments

#### $flag

``

## Stores a configured child element into its parent object

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

static

access | public

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

``