Propel API
Class

AbstractPropelDataModelTask

abstract class AbstractPropelDataModelTask extends Task

An abstract base Propel task to perform work related to the XML schema file.

The subclasses invoke templates to do the actual writing of the resulting files.

Methods

List getDataModels()

Return the data models that have been processed.

Hashtable getDataModelDbMap()

Return the data model to database name map.

addSchemaFileset(Fileset $set)

Adds a set of xml schema files (nested fileset attribute).

String getTargetDatabase()

Get the current target database.

setTargetDatabase(v $v)

Set the current target database.

string getTargetPackage()

Get the current target package.

setTargetPackage(string $v)

Set the current target package.

setPackageObjectModel(boolean $v)

Set the packageObjectModel switch on/off

setValidate(boolean $v)

Set whether to perform validation on the datamodel schema.xml file(s).

setXsd(PhingFile $v)

Set the XSD schema to use for validation of any datamodel schema.xml file(s).

setXsl(PhingFile $v)

Set the normalization XSLT to use to transform datamodel schema.xml file(s) before validation and parsing.

void setOutputDirectory(PhingFile $outputDirectory)

[REQUIRED] Set the output directory.

setDbEncoding(v $v)

Set the current target database encoding.

setUrl(string $url)

Set the DB connection url.

setUserid(string $userId)

Set the user name for the DB connection.

setPassword(string $password)

Set the password for the DB connection.

string getOutputDirectory()

Get the output directory.

Mapper createMapper()

Nested creator, creates one Mapper for this task.

PDO getConnection()

Gets the PDO connection, if URL specified.

Details

at line 147
public List getDataModels()

Return the data models that have been processed.

Return Value

List data models

at line 160
public Hashtable getDataModelDbMap()

Return the data model to database name map.

Return Value

Hashtable data model name to database name map.

at line 173
public addSchemaFileset(Fileset $set)

Adds a set of xml schema files (nested fileset attribute).

Parameters

Fileset $set a Set of xml schema files

at line 183
public String getTargetDatabase()

Get the current target database.

Return Value

String target database(s)

at line 193
public setTargetDatabase(v $v)

Set the current target database.

(e.g. mysql, oracle, ..)

Parameters

v $v target database(s)

at line 203
public string getTargetPackage()

Get the current target package.

Return Value

string target PHP package.

at line 214
public setTargetPackage(string $v)

Set the current target package.

This is where generated PHP classes will
live.

Parameters

string $v target PHP package.

at line 224
public setPackageObjectModel(boolean $v)

Set the packageObjectModel switch on/off

Parameters

boolean $v The build.property packageObjectModel

at line 233
public setValidate(boolean $v)

Set whether to perform validation on the datamodel schema.xml file(s).

Parameters

boolean $v

at line 242
public setXsd(PhingFile $v)

Set the XSD schema to use for validation of any datamodel schema.xml file(s).

Parameters

PhingFile $v PhingFile

at line 251
public setXsl(PhingFile $v)

Set the normalization XSLT to use to transform datamodel schema.xml file(s) before validation and parsing.

Parameters

PhingFile $v PhingFile

at line 263
public void setOutputDirectory(PhingFile $outputDirectory)

[REQUIRED] Set the output directory.

It will be
created if it doesn't exist.

Parameters

PhingFile $outputDirectory

Return Value

void

Exceptions

Exception

at line 282
public setDbEncoding(v $v)

Set the current target database encoding.

Parameters

v $v target database encoding

at line 292
public setUrl(string $url)

Set the DB connection url.

Parameters

string $url connection url

at line 302
public setUserid(string $userId)

Set the user name for the DB connection.

Parameters

string $userId database user

at line 312
public setPassword(string $password)

Set the password for the DB connection.

Parameters

string $password database password

at line 321
public string getOutputDirectory()

Get the output directory.

Return Value

string

at line 331
public Mapper createMapper()

Nested creator, creates one Mapper for this task.

Return Value

Mapper The created Mapper type object.

Exceptions

BuildException

at line 367
public PDO getConnection()

Gets the PDO connection, if URL specified.

Return Value

PDO Connection to use (for quoting, Platform class, etc.) or NULL if no connection params were specified.