Class

Database

class Database extends ScopedElement

A class for holding application data structures.

Methods

value getNamespace()

Get the value of the namespace.

from ScopedElement
setNamespace($v $v)

Set the value of the namespace.

from ScopedElement
value getPackage()

Get the value of package.

from ScopedElement
setPackage($v $v)

Set the value of package.

from ScopedElement
value getSchema()

Get the value of schema.

from ScopedElement
setSchema($v $v)

Set the value of schema.

from ScopedElement
__construct(string $name = null)

Constructs a new Database object.

PropelPlatformInterface getPlatform()

Returns the PropelPlatformInterface implementation for this database.

setPlatform(PropelPlatformInterface $platform)

Sets the PropelPlatformInterface implementation for this database.

getName()

Get the name of the Database

setName($name)

Set the name of the Database

string getBaseClass()

Get the value of baseClass.

setBaseClass(string $v)

Set the value of baseClass.

string getBasePeer()

Get the value of basePeer.

setBasePeer(string $v)

Set the value of basePeer.

string getDefaultIdMethod()

Get the value of defaultIdMethod.

setDefaultIdMethod(string $v)

Set the value of defaultIdMethod.

string getDefaultPhpNamingMethod()

Get the value of defaultPHPNamingMethod which specifies the method for converting schema names for table and column to PHP names.

setDefaultPhpNamingMethod(string $v)

Set the value of defaultPHPNamingMethod.

string getDefaultTranslateMethod()

Get the value of defaultTranslateMethod which specifies the method for translate validator error messages.

setDefaultStringFormat(string $defaultStringFormat)

Set the default string format for ActiveRecord objects in this Db.

string getDefaultStringFormat()

Get the default string format for ActiveRecord objects in this Db.

setDefaultTranslateMethod(string $v)

Set the value of defaultTranslateMethod.

boolean isHeavyIndexing()

Get the value of heavyIndexing.

boolean getHeavyIndexing()

Get the value of heavyIndexing.

setHeavyIndexing(boolean $v)

Set the value of heavyIndexing.

Table[] getTables()

Return the list of all tables

integer countTables()

Return the number of tables in the database

array getTablesForSql()

Return the list of all tables that have a SQL representation

boolean hasTable(string $name, boolean $caseInsensitive = false)

Check whether the database has a table.

Table getTable(string $name, boolean $caseInsensitive = false)

Return the table with the specified name.

boolean hasTableByPhpName(string $phpName)

Check whether the database has a table.

Table getTableByPhpName(string $phpName)

Return the table with the specified phpName.

addTable($data)

An utility method to add a new table from an xml attribute.

setAppData(AppData $parent)

Set the parent of the database

AppData getAppData()

Get the parent of the table

Domain addDomain(Domain|string $data)

Adds Domain object from tag.

Domain getDomain($domainName)

Get already configured Domain object by name.

getGeneratorConfig()

getBuildProperty($key)

Behavior addBehavior($bdata)

Adds a new Behavior to the database

Array getBehaviors()

Get the database behaviors

boolean hasBehavior(string $name)

check if the database has a behavior by name

Behavior getBehavior(string $name)

Get one database behavior by name

string getTablePrefix()

Get the table prefix for this database

Behavior getNextTableBehavior()

Get the next behavior on all tables, ordered by behavior priority, and skipping the ones that were already executed,

doFinalInitialization()

appendXml(DOMNode $node)

Details

in ScopedElement at line 73
public value getNamespace()

Get the value of the namespace.

Return Value

value of namespace.

in ScopedElement at line 83
public setNamespace($v $v)

Set the value of the namespace.

Parameters

$v $v Value to assign to namespace.

in ScopedElement at line 100
public value getPackage()

Get the value of package.

Return Value

value of package.

in ScopedElement at line 110
public setPackage($v $v)

Set the value of package.

Parameters

$v $v Value to assign to package.

in ScopedElement at line 124
public value getSchema()

Get the value of schema.

Return Value

value of schema.

in ScopedElement at line 134
public setSchema($v $v)

Set the value of schema.

Parameters

$v $v Value to assign to schema.

at line 92
public __construct(string $name = null)

Constructs a new Database object.

Parameters

string $name

at line 121
public PropelPlatformInterface getPlatform()

Returns the PropelPlatformInterface implementation for this database.

Return Value

PropelPlatformInterface a Platform implementation

at line 131
public setPlatform(PropelPlatformInterface $platform)

Sets the PropelPlatformInterface implementation for this database.

Parameters

PropelPlatformInterface $platform A Platform implementation

at line 139
public getName()

Get the name of the Database

at line 147
public setName($name)

Set the name of the Database

Parameters

$name

at line 157
public string getBaseClass()

Get the value of baseClass.

Return Value

string

at line 167
public setBaseClass(string $v)

Set the value of baseClass.

Parameters

string $v Value to assign to baseClass.

at line 177
public string getBasePeer()

Get the value of basePeer.

Return Value

string

at line 187
public setBasePeer(string $v)

Set the value of basePeer.

Parameters

string $v Value to assign to basePeer.

at line 197
public string getDefaultIdMethod()

Get the value of defaultIdMethod.

Return Value

string

at line 207
public setDefaultIdMethod(string $v)

Set the value of defaultIdMethod.

Parameters

string $v Value to assign to defaultIdMethod.

at line 218
public string getDefaultPhpNamingMethod()

Get the value of defaultPHPNamingMethod which specifies the method for converting schema names for table and column to PHP names.

Return Value

string

at line 228
public setDefaultPhpNamingMethod(string $v)

Set the value of defaultPHPNamingMethod.

Parameters

string $v The default naming conversion for this database to use.

at line 239
public string getDefaultTranslateMethod()

Get the value of defaultTranslateMethod which specifies the method for translate validator error messages.

Return Value

string

at line 249
public setDefaultStringFormat(string $defaultStringFormat)

Set the default string format for ActiveRecord objects in this Db.

Parameters

string $defaultStringFormat Any of 'XML', 'YAML', 'JSON', or 'CSV'

at line 259
public string getDefaultStringFormat()

Get the default string format for ActiveRecord objects in this Db.

Return Value

string The default string format

at line 269
public setDefaultTranslateMethod(string $v)

Set the value of defaultTranslateMethod.

Parameters

string $v The default translate method to use.

at line 282
public boolean isHeavyIndexing()

Get the value of heavyIndexing.

This is a synonym for getHeavyIndexing().

Return Value

boolean Value of heavyIndexing.

See also

getHeavyIndexing()

at line 292
public boolean getHeavyIndexing()

Get the value of heavyIndexing.

Return Value

boolean Value of heavyIndexing.

at line 302
public setHeavyIndexing(boolean $v)

Set the value of heavyIndexing.

Parameters

boolean $v Value to assign to heavyIndexing.

at line 312
public Table[] getTables()

Return the list of all tables

Return Value

Table[]

at line 322
public integer countTables()

Return the number of tables in the database

Return Value

integer

at line 339
public array getTablesForSql()

Return the list of all tables that have a SQL representation

Return Value

array

at line 359
public boolean hasTable(string $name, boolean $caseInsensitive = false)

Check whether the database has a table.

Parameters

string $name the name of the table (e.g. 'my_table')
boolean $caseInsensitive Whether the check is case insensitive. False by default.

Return Value

boolean

at line 376
public Table getTable(string $name, boolean $caseInsensitive = false)

Return the table with the specified name.

Parameters

string $name The name of the table (e.g. 'my_table')
boolean $caseInsensitive Whether the check is case insensitive. False by default.

Return Value

Table a Table object or null if it doesn't exist

at line 396
public boolean hasTableByPhpName(string $phpName)

Check whether the database has a table.

Parameters

string $phpName the PHP Name of the table (e.g. 'MyTable')

Return Value

boolean

at line 408
public Table getTableByPhpName(string $phpName)

Return the table with the specified phpName.

Parameters

string $phpName the PHP Name of the table (e.g. 'MyTable')

Return Value

Table a Table object or null if it doesn't exist

at line 420
public addTable($data)

An utility method to add a new table from an xml attribute.

Parameters

$data

at line 462
public setAppData(AppData $parent)

Set the parent of the database

Parameters

AppData $parent

at line 472
public AppData getAppData()

Get the parent of the table

Return Value

AppData

at line 484
public Domain addDomain(Domain|string $data)

Adds Domain object from tag.

Parameters

Domain|string $data XML attributes (array) or Domain object.

Return Value

Domain

at line 506
public Domain getDomain($domainName)

Get already configured Domain object by name.

Parameters

$domainName

Return Value

Domain

at line 515
public getGeneratorConfig()

at line 524
public getBuildProperty($key)

Parameters

$key

at line 538
public Behavior addBehavior($bdata)

Adds a new Behavior to the database

Parameters

$bdata

Return Value

Behavior A behavior instance

at line 560
public Array getBehaviors()

Get the database behaviors

Return Value

Array of Behavior objects

at line 572
public boolean hasBehavior(string $name)

check if the database has a behavior by name

Parameters

string $name the behavior name

Return Value

boolean True if the behavior exists

at line 584
public Behavior getBehavior(string $name)

Get one database behavior by name

Parameters

string $name the behavior name

Return Value

Behavior a behavior object

at line 594
public string getTablePrefix()

Get the table prefix for this database

Return Value

string the table prefix

at line 605
public Behavior getNextTableBehavior()

Get the next behavior on all tables, ordered by behavior priority, and skipping the ones that were already executed,

Return Value

Behavior

at line 624
public doFinalInitialization()

at line 671
public appendXml(DOMNode $node)

Parameters

DOMNode $node

See also

XMLElement::appendXml(DOMNode)