class Schema
A class for holding application data structures.
Methods
__construct(PlatformInterface $platform = null)
Creates a new instance for the specified database type. |
||
setPlatform(PlatformInterface $platform)
Sets the platform object to use for any databases added to this application schema. |
||
PlatformInterface |
getPlatform()
Returns the platform object to use for any databases added to this application schema. |
|
setGeneratorConfig(GeneratorConfigInterface $generatorConfig)
Sets the generator configuration |
||
GeneratorConfigInterface |
getGeneratorConfig()
Returns the generator configuration |
|
setName(string $name)
Sets the schema name. |
||
string |
getName()
Returns the schema name. |
|
string |
getShortName()
Returns the schema short name (without the '-schema' postfix). |
|
array |
getDatabases(boolean $doFinalInitialization = true)
Returns an array of all databases. |
|
boolean |
hasMultipleDatabases()
Returns whether or not this schema has multiple databases. |
|
Database |
getDatabase(string $name = null, boolean $doFinalInitialization = true)
Returns the database according to the specified name. |
|
boolean |
hasDatabase(string $name)
Returns whether or not a database with the specified name exists in this schema. |
|
Database |
addDatabase(Database|array $database)
Adds a database to the list and sets the Schema property to this Schema. |
|
doFinalInitialization()
Finalizes the databases initialization. |
||
joinSchemas(array $schemas)
Merge other Schema objects together into this Schema object. |
||
integer |
countTables()
Returns the number of tables in all the databases of this Schema object. |
|
string |
toString()
Creates a string representation of this Schema. |
|
__toString()
Magic string method |
Details
at line 39
public
__construct(PlatformInterface $platform = null)
Creates a new instance for the specified database type.
at line 55
public
setPlatform(PlatformInterface $platform)
Sets the platform object to use for any databases added to this application schema.
at line 66
public PlatformInterface
getPlatform()
Returns the platform object to use for any databases added to this application schema.
at line 76
public
setGeneratorConfig(GeneratorConfigInterface $generatorConfig)
Sets the generator configuration
at line 86
public GeneratorConfigInterface
getGeneratorConfig()
Returns the generator configuration
at line 96
public
setName(string $name)
Sets the schema name.
at line 106
public string
getName()
Returns the schema name.
at line 116
public string
getShortName()
Returns the schema short name (without the '-schema' postfix).
at line 130
public array
getDatabases(boolean $doFinalInitialization = true)
Returns an array of all databases.
The first boolean parameter tells whether or not to run the
final initialization process.
at line 146
public boolean
hasMultipleDatabases()
Returns whether or not this schema has multiple databases.
at line 158
public Database
getDatabase(string $name = null, boolean $doFinalInitialization = true)
Returns the database according to the specified name.
at line 188
public boolean
hasDatabase(string $name)
Returns whether or not a database with the specified name exists in this schema.
at line 207
public Database
addDatabase(Database|array $database)
Adds a database to the list and sets the Schema property to this Schema.
The database can be specified as a Database object or a
DOMNode object.
at line 236
public
doFinalInitialization()
Finalizes the databases initialization.
at line 251
public
joinSchemas(array $schemas)
Merge other Schema objects together into this Schema object.
at line 288
public integer
countTables()
Returns the number of tables in all the databases of this Schema object.
at line 304
public string
toString()
Creates a string representation of this Schema.
The representation is given in xml format.
at line 325
public
__toString()
Magic string method