Propel API
Class

PropelDataDumpTask

class PropelDataDumpTask extends AbstractPropelDataModelTask

Dumps the contenst of selected databases to XML data dump file.

The results of the data dump can be converted to SQL using
the PropelDataSQLTask class.

The database may be specified (via 'databaseName' attribute) if you only want to dump
the contents of one database. Otherwise it is assumed that all databases described
by datamodel schema file(s) will be dumped.

Properties

$conn The database connection used to retrieve the data to dump.

Methods

List getDataModels()

Return the data models that have been processed.

from AbstractPropelDataModelTask
Hashtable getDataModelDbMap()

Return the data model to database name map.

from AbstractPropelDataModelTask
addSchemaFileset(Fileset $set)

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

from AbstractPropelDataModelTask
String getTargetDatabase()

Get the current target database.

from AbstractPropelDataModelTask
setTargetDatabase(v $v)

Set the current target database.

from AbstractPropelDataModelTask
string getTargetPackage()

Get the current target package.

from AbstractPropelDataModelTask
setTargetPackage(string $v)

Set the current target package.

from AbstractPropelDataModelTask
setPackageObjectModel(boolean $v)

Set the packageObjectModel switch on/off

from AbstractPropelDataModelTask
setValidate(boolean $v)

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

from AbstractPropelDataModelTask
setXsd(PhingFile $v)

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

from AbstractPropelDataModelTask
setXsl(PhingFile $v)

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

from AbstractPropelDataModelTask
void setOutputDirectory(PhingFile $outputDirectory)

[REQUIRED] Set the output directory.

from AbstractPropelDataModelTask
setDbEncoding(v $v)

Set the current target database encoding.

from AbstractPropelDataModelTask
setUrl(string $url)

Set the DB connection url.

from AbstractPropelDataModelTask
setUserid(string $userId)

Set the user name for the DB connection.

from AbstractPropelDataModelTask
setPassword(string $password)

Set the password for the DB connection.

from AbstractPropelDataModelTask
string getOutputDirectory()

Get the output directory.

from AbstractPropelDataModelTask
Mapper createMapper()

Nested creator, creates one Mapper for this task.

from AbstractPropelDataModelTask
PDO getConnection()

Gets the PDO connection, if URL specified.

from AbstractPropelDataModelTask
void setDataDbMap(PhingFile $datadbmap)

Set the file that maps between data XML files and databases.

PhingFile getDataDbMap()

Get the file that maps between data XML files and databases.

The getDatabaseName()

Get the database name to dump

setDatabaseName(v $v)

Set the database name

The getDatabaseUrl()

Get the database url

setDatabaseUrl(string $v)

Set the database url

string getDatabaseUser()

Get the database user

setDatabaseUser(string $v)

Set the database user

string getDatabasePassword()

Get the database password

setDatabasePassword(string $v)

Set the database password

string getDatabaseDriver()

Get the database driver name

setDatabaseDriver(string $v)

Set the database driver name

void main()

Iterates through each datamodel/database, dumps the contents of all tables and creates a DOM XML doc.

Details

public List getDataModels()

Return the data models that have been processed.

Return Value

List data models

public Hashtable getDataModelDbMap()

Return the data model to database name map.

Return Value

Hashtable data model name to database name map.

public addSchemaFileset(Fileset $set)

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

Parameters

Fileset $set a Set of xml schema files

public String getTargetDatabase()

Get the current target database.

Return Value

String target database(s)

public setTargetDatabase(v $v)

Set the current target database.

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

Parameters

v $v target database(s)

public string getTargetPackage()

Get the current target package.

Return Value

string target PHP package.

public setTargetPackage(string $v)

Set the current target package.

This is where generated PHP classes will
live.

Parameters

string $v target PHP package.

public setPackageObjectModel(boolean $v)

Set the packageObjectModel switch on/off

Parameters

boolean $v The build.property packageObjectModel

public setValidate(boolean $v)

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

Parameters

boolean $v

public setXsd(PhingFile $v)

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

Parameters

PhingFile $v PhingFile

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

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

public setDbEncoding(v $v)

Set the current target database encoding.

Parameters

v $v target database encoding

public setUrl(string $url)

Set the DB connection url.

Parameters

string $url connection url

public setUserid(string $userId)

Set the user name for the DB connection.

Parameters

string $userId database user

public setPassword(string $password)

Set the password for the DB connection.

Parameters

string $password database password

public string getOutputDirectory()

Get the output directory.

Return Value

string

public Mapper createMapper()

Nested creator, creates one Mapper for this task.

Return Value

Mapper The created Mapper type object.

Exceptions

BuildException

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.

at line 85
public void setDataDbMap(PhingFile $datadbmap)

Set the file that maps between data XML files and databases.

Parameters

PhingFile $datadbmap

Return Value

void

at line 95
public PhingFile getDataDbMap()

Get the file that maps between data XML files and databases.

Return Value

PhingFile $datadbmap.

at line 105
public The getDatabaseName()

Get the database name to dump

Return Value

The DatabaseName value

at line 115
public setDatabaseName(v $v)

Set the database name

Parameters

v $v The new DatabaseName value

at line 125
public The getDatabaseUrl()

Get the database url

Return Value

The DatabaseUrl value

at line 135
public setDatabaseUrl(string $v)

Set the database url

Parameters

string $v The PEAR-compatible database DSN URL.

at line 146
public string getDatabaseUser()

Get the database user

Return Value

string database user

at line 157
public setDatabaseUser(string $v)

Set the database user

Parameters

string $v The new DatabaseUser value

at line 167
public string getDatabasePassword()

Get the database password

Return Value

string database password

at line 178
public setDatabasePassword(string $v)

Set the database password

Parameters

string $v The new DatabasePassword value

at line 188
public string getDatabaseDriver()

Get the database driver name

Return Value

string database driver name

at line 198
public setDatabaseDriver(string $v)

Set the database driver name

Parameters

string $v The new DatabaseDriver value

at line 250
public void main()

Iterates through each datamodel/database, dumps the contents of all tables and creates a DOM XML doc.

Return Value

void

Exceptions

BuildException