Propel API
Class

AppData

class AppData

A class for holding application data structures.

Methods

__construct(PropelPlatformInterface $defaultPlatform = null)

Creates a new instance for the specified database type.

setPlatform(PropelPlatformInterface $defaultPlatform)

Sets the platform object to use for any databases added to this application model.

Platform getPlatform()

Gets the platform object to use for any databases added to this application model.

setGeneratorConfig(GeneratorConfig $generatorConfig)

Set the generator configuration

GeneratorConfig getGeneratorConfig()

Get the generator configuration

setName(name $name)

Set the name of the database.

String getName()

Get the name of the database.

String getShortName()

Get the short name of the database (without the '-schema' postfix).

Array getDatabases($doFinalInit = true)

Return an array of all databases

boolean hasMultipleDatabases()

Returns whether this application has multiple databases.

A getDatabase($name = null, $doFinalInit = true)

Return the database with the specified name.

boolean hasDatabase(name $name)

Checks whether a database with the specified nam exists in this AppData

addDatabase(db $db)

Add a database to the list and sets the AppData property to this AppData

doFinalInitialization()

joinAppDatas(array[AppData] $ads)

Merge other appData objects into this object

integer countTables()

Returns the number of tables in all the databases of this AppData object

string toString()

Creates a string representation of this AppData.

__toString()

Magic string method

Details

at line 62
public __construct(PropelPlatformInterface $defaultPlatform = null)

Creates a new instance for the specified database type.

Parameters

PropelPlatformInterface $defaultPlatform

at line 74
public setPlatform(PropelPlatformInterface $defaultPlatform)

Sets the platform object to use for any databases added to this application model.

Parameters

PropelPlatformInterface $defaultPlatform

at line 84
public Platform getPlatform()

Gets the platform object to use for any databases added to this application model.

Return Value

Platform

at line 94
public setGeneratorConfig(GeneratorConfig $generatorConfig)

Set the generator configuration

Parameters

GeneratorConfig $generatorConfig

at line 104
public GeneratorConfig getGeneratorConfig()

Get the generator configuration

Return Value

GeneratorConfig

at line 114
public setName(name $name)

Set the name of the database.

Parameters

name $name of the database.

at line 124
public String getName()

Get the name of the database.

Return Value

String name

at line 134
public String getShortName()

Get the short name of the database (without the '-schema' postfix).

Return Value

String name

at line 144
public Array getDatabases($doFinalInit = true)

Return an array of all databases

Parameters

$doFinalInit

Return Value

Array of Database objects

at line 159
public boolean hasMultipleDatabases()

Returns whether this application has multiple databases.

Return Value

boolean True if the application has multiple databases

at line 170
public A getDatabase($name = null, $doFinalInit = true)

Return the database with the specified name.

Parameters

$name
$doFinalInit

Return Value

A Database object. If it does not exist it returns null

at line 197
public boolean hasDatabase(name $name)

Checks whether a database with the specified nam exists in this AppData

Parameters

name $name database name

Return Value

boolean

at line 213
public addDatabase(db $db)

Add a database to the list and sets the AppData property to this AppData

Parameters

db $db the database to add

at line 237
public doFinalInitialization()

at line 252
public joinAppDatas(array[AppData] $ads)

Merge other appData objects into this object

Parameters

array[AppData] $ads

at line 289
public integer countTables()

Returns the number of tables in all the databases of this AppData object

Return Value

integer

at line 304
public string toString()

Creates a string representation of this AppData.

The representation is given in xml format.

Return Value

string Representation in xml format

at line 322
public __toString()

Magic string method

See also

toString()