PHP Class Bolt\Storage\Database\Schema\Manager

Based on on parts of the monolithic Bolt\Database\IntegrityChecker class.
Author: Gawain Lynch ([email protected])
Inheritance: implements Bolt\Storage\Database\Schema\SchemaManagerInterface
Afficher le fichier Open project: bolt/bolt Class Usage Examples

Protected Properties

Свойство Type Description
$config Bolt\Config
$connection Doctrine\DBAL\Connection
$installedTables Doctrine\DBAL\Schema\Table[]
$schema Doctrine\DBAL\Schema\Schema
$schemaTables Doctrine\DBAL\Schema\Table[]

Méthodes publiques

Méthode Description
__construct ( Silex\Application $app ) Constructor.
check ( ) : SchemaCheck Run a check against current and configured schemas.
getInstalledTables ( ) : Doctrine\DBAL\Schema\Table[] Get the installed table list from Doctrine.
getSchema ( ) : Doctrine\DBAL\Schema\Schema Get the built schema.
getSchemaTables ( ) : Doctrine\DBAL\Schema\Table[] Get a merged array of tables.
getTableName ( string $name ) : string | null Get the database name of a table from an alias.
hasUserTable ( ) : boolean Check if just the users table is present.
isCheckRequired ( )
isUpdateRequired ( )
registerExtensionTable ( callable $generator ) This method allows extensions to register their own tables.
update ( ) : SchemaCheck Run database table updates.

Private Methods

Méthode Description
getSchemaComparator ( ) : Bolt\Storage\Database\Schema\Comparison\BaseComparator
getSchemaTimer ( ) : Timer

Method Details

__construct() public méthode

Constructor.
public __construct ( Silex\Application $app )
$app Silex\Application

check() public méthode

Run a check against current and configured schemas.
public check ( ) : SchemaCheck
Résultat SchemaCheck

getInstalledTables() public méthode

Get the installed table list from Doctrine.
public getInstalledTables ( ) : Doctrine\DBAL\Schema\Table[]
Résultat Doctrine\DBAL\Schema\Table[]

getSchema() public méthode

Get the built schema.
public getSchema ( ) : Doctrine\DBAL\Schema\Schema
Résultat Doctrine\DBAL\Schema\Schema

getSchemaTables() public méthode

Get a merged array of tables.
public getSchemaTables ( ) : Doctrine\DBAL\Schema\Table[]
Résultat Doctrine\DBAL\Schema\Table[]

getTableName() public méthode

Get the database name of a table from an alias.
public getTableName ( string $name ) : string | null
$name string
Résultat string | null

hasUserTable() public méthode

Check if just the users table is present.
public hasUserTable ( ) : boolean
Résultat boolean

isCheckRequired() public méthode

public isCheckRequired ( )

isUpdateRequired() public méthode

public isUpdateRequired ( )

registerExtensionTable() public méthode

This method allows extensions to register their own tables.
public registerExtensionTable ( callable $generator )
$generator callable A generator function that takes the Schema instance and returns a table or an array of tables.

update() public méthode

Run database table updates.
public update ( ) : SchemaCheck
Résultat SchemaCheck

Property Details

$config protected_oe property

protected Config,Bolt $config
Résultat Bolt\Config

$connection protected_oe property

protected Connection,Doctrine\DBAL $connection
Résultat Doctrine\DBAL\Connection

$installedTables protected_oe property

protected Table[],Doctrine\DBAL\Schema $installedTables
Résultat Doctrine\DBAL\Schema\Table[]

$schema protected_oe property

protected Schema,Doctrine\DBAL\Schema $schema
Résultat Doctrine\DBAL\Schema\Schema

$schemaTables protected_oe property

protected Table[],Doctrine\DBAL\Schema $schemaTables
Résultat Doctrine\DBAL\Schema\Table[]