class DatabaseManager implements ConnectionResolverInterface (View source)

Methods

void
__construct(Application $app, ConnectionFactory $factory)

Create a new database manager instance.

connection(string $name = null)

Get a database connection instance.

void
purge(string $name = null)

Disconnect from the given database and remove from local cache.

void
disconnect(string $name = null)

Disconnect from the given database.

reconnect(string $name = null)

Reconnect to the given database.

string
getDefaultConnection()

Get the default connection name.

void
setDefaultConnection(string $name)

Set the default connection name.

array
supportedDrivers()

Get all of the support drivers.

array
availableDrivers()

Get all of the drivers that are actually available.

void
extend(string $name, callable $resolver)

Register an extension connection resolver.

array
getConnections()

Return all of the created connections.

mixed
__call(string $method, array $parameters)

Dynamically pass methods to the default connection.

Details

at line line 48
void __construct(Application $app, ConnectionFactory $factory)

Create a new database manager instance.

Parameters

Application $app
ConnectionFactory $factory

Return Value

void

at line line 60
ConnectionInterface connection(string $name = null)

Get a database connection instance.

Parameters

string $name

Return Value

ConnectionInterface

at line line 98
void purge(string $name = null)

Disconnect from the given database and remove from local cache.

Parameters

string $name

Return Value

void

at line line 111
void disconnect(string $name = null)

Disconnect from the given database.

Parameters

string $name

Return Value

void

at line line 124
Connection reconnect(string $name = null)

Reconnect to the given database.

Parameters

string $name

Return Value

Connection

at line line 250
string getDefaultConnection()

Get the default connection name.

Return Value

string

at line line 261
void setDefaultConnection(string $name)

Set the default connection name.

Parameters

string $name

Return Value

void

at line line 271
array supportedDrivers()

Get all of the support drivers.

Return Value

array

at line line 281
array availableDrivers()

Get all of the drivers that are actually available.

Return Value

array

at line line 293
void extend(string $name, callable $resolver)

Register an extension connection resolver.

Parameters

string $name
callable $resolver

Return Value

void

at line line 303
array getConnections()

Return all of the created connections.

Return Value

array

at line line 315
mixed __call(string $method, array $parameters)

Dynamically pass methods to the default connection.

Parameters

string $method
array $parameters

Return Value

mixed