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.

PropelPlatformInterface getPlatform()

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

setGeneratorConfig(GeneratorConfigInterface $generatorConfig)

Set the generator configuration

GeneratorConfig getGeneratorConfig()

Get the generator configuration

setName(string $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).

Database[] getDatabases($doFinalInit = true)

Return an array of all databases

boolean hasMultipleDatabases()

Returns whether this application has multiple databases.

Database|null getDatabase(string $name = null, bool $doFinalInit = true)

Return the database with the specified name.

boolean hasDatabase(string $name)

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

Database addDatabase(Database|string $db)

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

doFinalInitialization()

joinAppDatas(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 66
public __construct(PropelPlatformInterface $defaultPlatform = null)

Creates a new instance for the specified database type.

Parameters

PropelPlatformInterface $defaultPlatform The default platform object to use for any databases added to this application model.

at line 78
public setPlatform(PropelPlatformInterface $defaultPlatform)

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

Parameters

PropelPlatformInterface $defaultPlatform

at line 88
public PropelPlatformInterface getPlatform()

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

at line 98
public setGeneratorConfig(GeneratorConfigInterface $generatorConfig)

Set the generator configuration

Parameters

GeneratorConfigInterface $generatorConfig

at line 108
public GeneratorConfig getGeneratorConfig()

Get the generator configuration

Return Value

GeneratorConfig

at line 118
public setName(string $name)

Set the name of the database.

Parameters

string $name

at line 128
public string getName()

Get the name of the database.

Return Value

string name

at line 138
public string getShortName()

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

Return Value

string name

at line 148
public Database[] getDatabases($doFinalInit = true)

Return an array of all databases

Parameters

$doFinalInit

Return Value

Database[]

at line 164
public boolean hasMultipleDatabases()

Returns whether this application has multiple databases.

Return Value

boolean True if the application has multiple databases

at line 177
public Database|null getDatabase(string $name = null, bool $doFinalInit = true)

Return the database with the specified name.

Parameters

string $name database name
bool $doFinalInit

Return Value

Database|null

at line 206
public boolean hasDatabase(string $name)

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

Parameters

string $name database name

Return Value

boolean

at line 225
public Database addDatabase(Database|string $db)

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

Parameters

Database|string $db the database to add

Return Value

Database

at line 250
public doFinalInitialization()

at line 267
public joinAppDatas(AppData[] $ads)

Merge other appData objects into this object

Parameters

AppData[] $ads

Exceptions

Exception

at line 304
public integer countTables()

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

Return Value

integer

at line 320
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 339
public __toString()

Magic string method

See also

toString()