Propel API
Class

GeneratorConfig

class GeneratorConfig implements GeneratorConfigInterface

A class that holds build properties and provide a class loading mechanism for the generator.

Methods

__construct(mixed $props = null)

Construct a new GeneratorConfig.

array getBuildProperties()

Gets the build properties.

setBuildProperties(mixed $props)

Parses the passed-in properties, renaming and saving eligible properties in this object.

mixed getBuildProperty(string $name)

Gets a specific propel (renamed) property from the build.

setBuildProperty(string $name, mixed $value)

Sets a specific propel (renamed) property from the build.

string getClassname(string $propname)

Resolves and returns the class name based on the specified property value.

string getBuilderClassname(string $type)

Resolves and returns the builder class name.

Platform getConfiguredPlatform(PDO $con = null, $database = null)

Creates and configures a new Platform class.

SchemaParser getConfiguredSchemaParser(PDO $con = null)

Creates and configures a new SchemaParser class for specified platform.

DataModelBuilder getConfiguredBuilder(Table $table, $type, $cache = true)

Gets a configured data model builder class for specified table and based on type.

Pluralizer getConfiguredPluralizer()

Gets a configured Pluralizer class.

string getConfiguredBehavior(string $name)

Gets a configured behavior class

setBuildConnections($buildConnections)

getBuildConnections()

getBuildConnection($databaseName = null)

getBuildPDO($database)

Details

at line 38
public __construct(mixed $props = null)

Construct a new GeneratorConfig.

Parameters

mixed $props Array or Iterator

at line 47
public array getBuildProperties()

Gets the build properties.

Return Value

array

at line 60
public setBuildProperties(mixed $props)

Parses the passed-in properties, renaming and saving eligible properties in this object.

Renames the propel.xxx properties to just xxx and renames any xxx.yyy properties
to xxxYyy as PHP doesn't like the xxx.yyy syntax.

Parameters

mixed $props Array or Iterator

at line 84
public mixed getBuildProperty(string $name)

Gets a specific propel (renamed) property from the build.

Parameters

string $name

Return Value

mixed

at line 95
public setBuildProperty(string $name, mixed $value)

Sets a specific propel (renamed) property from the build.

Parameters

string $name
mixed $value

at line 107
public string getClassname(string $propname)

Resolves and returns the class name based on the specified property value.

Parameters

string $propname The name of the property that holds the class path (dot-path notation).

Return Value

string The class name.

Exceptions

BuildException If the classname cannot be determined or class cannot be loaded.

at line 142
public string getBuilderClassname(string $type)

Resolves and returns the builder class name.

Parameters

string $type

Return Value

string The class name.

at line 156
public Platform getConfiguredPlatform(PDO $con = null, $database = null)

Creates and configures a new Platform class.

Parameters

PDO $con
$database

Return Value

Platform

Exceptions

BuildException

at line 190
public SchemaParser getConfiguredSchemaParser(PDO $con = null)

Creates and configures a new SchemaParser class for specified platform.

Parameters

PDO $con

Return Value

SchemaParser

Exceptions

BuildException

at line 211
public DataModelBuilder getConfiguredBuilder(Table $table, $type, $cache = true)

Gets a configured data model builder class for specified table and based on type.

Parameters

Table $table
$type
$cache

Return Value

DataModelBuilder

at line 225
public Pluralizer getConfiguredPluralizer()

Gets a configured Pluralizer class.

Return Value

Pluralizer

at line 239
public string getConfiguredBehavior(string $name)

Gets a configured behavior class

Parameters

string $name a behavior name

Return Value

string a behavior class name

at line 252
public setBuildConnections($buildConnections)

Parameters

$buildConnections

at line 257
public getBuildConnections()

at line 293
public getBuildConnection($databaseName = null)

Parameters

$databaseName

at line 312
public getBuildPDO($database)

Parameters

$database