PHP Класс Storm\Core\Relational\Database

The databse represents a group of tables, their columns and relations.
Автор: Elliot Levin ([email protected])
Наследование: use trait Storm\Core\Helpers\Type
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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 ( )

Защищенные методы

Метод Описание
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.

Приватные методы

Метод Описание
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.

Описание методов

Commit() закрытый публичный метод

Commits the supplied transaction.
final public Commit ( Transaction $Transaction ) : void
$Transaction Transaction The transaction to commit
Результат void

CommitTransaction() абстрактный защищенный метод

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
Результат void

GetTable() закрытый публичный метод

Gets a table by name.
final public GetTable ( string $Name ) : Storm\Core\Relational\ITable | null
$Name string The name of the table
Результат Storm\Core\Relational\ITable | null The matching table or null if it has not been registered

GetTables() закрытый публичный метод

final public GetTables ( ) : Storm\Core\Relational\ITable[]
Результат Storm\Core\Relational\ITable[]

GetTablesOrderedByDiscardingDependency() публичный метод

public GetTablesOrderedByDiscardingDependency ( ) : Storm\Core\Relational\ITable[]
Результат Storm\Core\Relational\ITable[]

GetTablesOrderedByPersistingDependency() публичный метод

public GetTablesOrderedByPersistingDependency ( ) : Storm\Core\Relational\ITable[]
Результат Storm\Core\Relational\ITable[]

HasTable() закрытый публичный метод

Whether or not a table has been registered.
final public HasTable ( string $Name ) : boolean
$Name string The name of the table
Результат boolean

Load() закрытый публичный метод

Load the rows specified by the request.
final public Load ( Request $Request ) : ResultRow[]
$Request Request The request to load
Результат ResultRow[] The loaded result rows

LoadResultRowData() абстрактный защищенный метод

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
Результат array[] The loaded result rows data as an associative array indexed by column identifiers

RegisterTables() абстрактный защищенный метод

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
Результат void

__construct() публичный метод

public __construct ( )