Class DatabaseManager

Methods summary

public
# __construct( Concrete\Core\Application\Application $app, Concrete\Core\Database\Connection\ConnectionFactory $factory )

Create a new database manager instance.

public Concrete\Core\Database\Connection\Connection
# getActiveConnection( )

Legacy entry point

public Concrete\Core\Database\Connection\Connection
# get( )

Legacy entry point

public Concrete\Core\Database\Connection\Connection
# connection( string $name = null )

Get a database connection instance.

public
# purge( string $name = null )

Disconnect from the given database and remove from local cache.

public
# disconnect( string $name = null )

Disconnect from the given database.

public Concrete\Core\Database\Connection\Connection
# reconnect( string $name = null )

Reconnect to the given database.

protected Concrete\Core\Database\Connection\Connection
# refreshPdoConnections( string $name )

Refresh the PDO connections on a given connection.

protected Concrete\Core\Database\Connection\Connection
# makeConnection( string $name )

Make the database connection instance.

protected Concrete\Core\Database\Connection\Connection
# prepare( Concrete\Core\Database\Connection\Connection $connection )

Prepare the database connection instance.

protected array
# getConfig( string $name )

Get the configuration for a connection.

public string
# getDefaultConnection( )

Get the default connection name.

public
# setDefaultConnection( string $name )

Set the default connection name.

public
# extend( string $name, callable $resolver )

Register an extension connection resolver.

public Concrete\Core\Database\Connection\Connection[]
# getConnections( )

Return all of the created connections.

public mixed
# __call( string $method, array $parameters )

Dynamically pass methods to the default connection.

public Concrete\Core\Database\Connection\ConnectionFactory

Properties summary

protected Concrete\Core\Application\Application $app

The application instance.

#
protected Concrete\Core\Database\Connection\ConnectionFactory $factory

The database connection factory instance.

#
protected Concrete\Core\Database\Connection\Connection[] $connections

The active connection instances.

# array()
protected array $extensions

The custom connection resolvers.

# array()