PHP Class Storm\Core\Relational\Database

The databse represents a group of tables, their columns and relations.
Author: Elliot Levin ([email protected])
Inheritance: use trait Storm\Core\Helpers\Type
Afficher le fichier Open project: timetoogo/penumbra Class Usage Examples

Méthodes publiques

Méthode Description
Commit ( Transaction $Transaction ) : void Commits the supplied transaction.
GetTable ( string $Name ) : Storm\Core\Relational\ITable | null Gets a table by name.
GetTables ( ) : Storm\Core\Relational\ITable[]
GetTablesOrderedByDiscardingDependency ( ) : Storm\Core\Relational\ITable[]
GetTablesOrderedByPersistingDependency ( ) : Storm\Core\Relational\ITable[]
HasTable ( string $Name ) : boolean Whether or not a table has been registered.
Load ( Request $Request ) : ResultRow[] Load the rows specified by the request.
__construct ( )

Méthodes protégées

Méthode Description
CommitTransaction ( Transaction $Transaction ) : void This method should be implemented such that it commits the supplied transaction to the underlying database.
LoadResultRowData ( Request $Request ) : array[] This method should be implemented such that is returns the rows specified by the request from the underlying database.
RegisterTables ( Registrar $Registrar ) : void The method to specify the tables in the current database.

Private Methods

Méthode Description
AddTableToOrderedTables ( Storm\Core\Relational\ITable $Table, array &$OrderedTables, integer $DependencyMode ) : void Adds a table to an array in a specified dependency order.
AddTables ( array $Tables ) Adds an array of tables.
VerifyTable ( $Method, Storm\Core\Relational\ITable $Table ) Verifies a table is registered in this database.

Method Details

Commit() final public méthode

Commits the supplied transaction.
final public Commit ( Transaction $Transaction ) : void
$Transaction Transaction The transaction to commit
Résultat void

CommitTransaction() abstract protected méthode

This method should be implemented such that it commits the supplied transaction to the underlying database.
abstract protected CommitTransaction ( Transaction $Transaction ) : void
$Transaction Transaction The transaction to commit
Résultat void

GetTable() final public méthode

Gets a table by name.
final public GetTable ( string $Name ) : Storm\Core\Relational\ITable | null
$Name string The name of the table
Résultat Storm\Core\Relational\ITable | null The matching table or null if it has not been registered

GetTables() final public méthode

final public GetTables ( ) : Storm\Core\Relational\ITable[]
Résultat Storm\Core\Relational\ITable[]

GetTablesOrderedByDiscardingDependency() public méthode

public GetTablesOrderedByDiscardingDependency ( ) : Storm\Core\Relational\ITable[]
Résultat Storm\Core\Relational\ITable[]

GetTablesOrderedByPersistingDependency() public méthode

public GetTablesOrderedByPersistingDependency ( ) : Storm\Core\Relational\ITable[]
Résultat Storm\Core\Relational\ITable[]

HasTable() final public méthode

Whether or not a table has been registered.
final public HasTable ( string $Name ) : boolean
$Name string The name of the table
Résultat boolean

Load() final public méthode

Load the rows specified by the request.
final public Load ( Request $Request ) : ResultRow[]
$Request Request The request to load
Résultat ResultRow[] The loaded result rows

LoadResultRowData() abstract protected méthode

This method should be implemented such that is returns the rows specified by the request from the underlying database.
abstract protected LoadResultRowData ( Request $Request ) : array[]
$Request Request The request to load
Résultat array[] The loaded result rows data as an associative array indexed by column identifiers

RegisterTables() abstract protected méthode

The method to specify the tables in the current database.
abstract protected RegisterTables ( Registrar $Registrar ) : void
$Registrar Storm\Core\Containers\Registrar The registrar to register the tables
Résultat void

__construct() public méthode

public __construct ( )