PHP Class ProjectConfigurator, symfony-1.4

This class handles the occurance of registered datatype tags like FileSet
Author: Andreas Aderhold ([email protected])
Mostra file Open project: vjousse/symfony-1.4 Class Usage Examples

Public Properties

Property Type Description
$buildFile
$buildFileParent
$locator
$project

Public Methods

Method Description
__construct ( Project $project, PhingFile $buildFile ) Constructs a new ProjectConfigurator object This constructor is private. Use a static call to configureProject to configure a project.
addText ( $project, $target, $text = null ) Configures the #CDATA of an element.
configure ( $target, $attrs, Project $project ) Configures an element and resolves eventually given properties.
configureId ( $target, $attr ) Scan Attributes for the id attribute and maybe add a reference to project.
configureProject ( Project $project, PhingFile $buildFile ) Static call to ProjectConfigurator. Use this to configure a project. Do not use the new operator.
replaceProperties ( Project $project, $value, $keys ) : string Replace ${} style constructions in the given value with the string value of the corresponding data types. This method is static.
storeChild ( $project, $parent, $child, $tag ) Stores a configured child element into its parent object

Protected Methods

Method Description
parse ( ) Creates the ExpatParser, sets root handler and kick off parsing process.

Private Methods

Method Description
replacePropertyCallback ( $matches ) Private [static] function for use by preg_replace_callback to replace a single param.

Method Details

__construct() public method

Constructs a new ProjectConfigurator object This constructor is private. Use a static call to configureProject to configure a project.
public __construct ( Project $project, PhingFile $buildFile )
$project Project
$buildFile PhingFile

addText() public static method

Configures the #CDATA of an element.
public static addText ( $project, $target, $text = null )

configure() public static method

Configures an element and resolves eventually given properties.
public static configure ( $target, $attrs, Project $project )
$project Project

configureId() public method

Scan Attributes for the id attribute and maybe add a reference to project.
public configureId ( $target, $attr )

configureProject() public static method

Static call to ProjectConfigurator. Use this to configure a project. Do not use the new operator.
public static configureProject ( Project $project, PhingFile $buildFile )
$project Project
$buildFile PhingFile

parse() protected method

Creates the ExpatParser, sets root handler and kick off parsing process.
protected parse ( )

replaceProperties() public static method

Replace ${} style constructions in the given value with the string value of the corresponding data types. This method is static.
public static replaceProperties ( Project $project, $value, $keys ) : string
$project Project
return string the replaced string or null if the string itself was null

storeChild() public static method

Stores a configured child element into its parent object
public static storeChild ( $project, $parent, $child, $tag )

Property Details

$buildFile public_oe property

public $buildFile

$buildFileParent public_oe property

public $buildFileParent

$locator public_oe property

public $locator

$project public_oe property

public $project