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

$ignoreProjectTag= 'false'
Indicates whether the project tag attributes are to be ignored when processing a particular build file.
falseDetails- Type
- n/a

$parseEndTarget= ''
Synthetic target that will be called at the end to the parse phase
- Type
- n/a

$propReplaceLogLevel= 'Project::MSG_VERBOSE'
Project::MSG_VERBOSEDetails- Type
- n/a
Methods

__construct(
object $project, object $buildFile
)
:
voidConstructs a new ProjectConfigurator object
This constructor is private. Use a static call to
configureProject to configure a project.
| Name | Type | Description |
|---|---|---|
| $project | object | the Project instance this configurator should use |
| $buildFile | object | the buildfile object the parser should use |
- Access
- private

addText(
object $project, object $target, string $text
=
null
)
:
voidConfigures the #CDATA of an element.
| Name | Type | Description |
|---|---|---|
| $project | object | the project this element belongs to |
| $target | object | the element to configure |
| $text | string | the element's #CDATA |
- Access
- public

configure(
object $target, array $attrs, object $project
)
:
voidConfigures an element and resolves eventually given properties.
| Name | Type | Description |
|---|---|---|
| $target | object | the element to configure |
| $attrs | array | the element's attributes |
| $project | object | the project this element belongs to |
| Exception | Description |
|---|---|
| \Exception | if arguments are not valid |
| \BuildException | if attributes can not be configured |
- Access
- public

configureId(
object $target, array $attr
)
:
voidScan Attributes for the id attribute and maybe add a reference to project.
| Name | Type | Description |
|---|---|---|
| $target | object | the element's object |
| $attr | array | the element's attributes |

configureProject(
object $project, object $buildFile
)
:
voidStatic call to ProjectConfigurator. Use this to configure a project. Do not use the new operator.
| Name | Type | Description |
|---|---|---|
| $project | object | the Project instance this configurator should use |
| $buildFile | object | the buildfile object the parser should use |
- Access
- public

delayTaskUntilParseEnd(
\Task $task
)
:
voidDelay execution of a task until after the current parse phase has completed.
| Name | Type | Description |
|---|---|---|
| $task | \Task | Task to execute after parse |

getBuildFile(
)
:
\thefind out the build file
| Type | Description |
|---|---|
| \the | build file to which the xml context belongs |

getBuildFileParent(
)
:
\thefind out the parent build file of this build file
| Type | Description |
|---|---|
| \the | parent build file of this build file |

getCurrentProjectName(
)
:
\currentfind out the current project name
| Type | Description |
|---|---|
| \current | project name |

isIgnoringProjectTag(
)
:
\whethertells whether the project tag is being ignored
| Type | Description |
|---|---|
| \whether | the project tag is being ignored |

parse(
)
:
voidCreates the ExpatParser, sets root handler and kick off parsing process.
| Exception | Description |
|---|---|
| \BuildException | if there is any kind of execption during the parsing process |
- Access
- private

replaceProperties(
object $project, string $value, array $keys, integer $logLevel
=
Project::MSG_VERBOSE
)
:
stringReplace ${} style constructions in the given value with the string value of the corresponding data types. This method is static.
| 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 |
| Type | Description |
|---|---|
| string | the replaced string or <code>null</code> if the string itself was null |

replacePropertyCallback(
$matches
)
:
voidPrivate [static] function for use by preg_replace_callback to replace a single param.
This method makes use of a static variable to hold the
| Name | Type | Description |
|---|---|---|
| $matches |

setCurrentProjectName(
\name $name
)
:
voidset the name of the current project
| Name | Type | Description |
|---|---|---|
| $name | \name | name of the current project |

setIgnoreProjectTag(
\flag $flag
)
:
voidsets the flag to ignore the project tag
| Name | Type | Description |
|---|---|---|
| $flag | \flag | to ignore the project tag |

storeChild(
object $project, object $parent, object $child, string $tag
)
:
voidStores a configured child element into its parent object
| 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 |
- Access
- public