Documentation

DatabaseManager
in package
implements ConnectionResolverInterface

Tags
mixin

\Illuminate\Database\Connection

Interfaces, Classes and Traits

ConnectionResolverInterface

Table of Contents

$app  : Application
The application instance.
$connections  : array<string|int, mixed>
The active connection instances.
$extensions  : array<string|int, mixed>
The custom connection resolvers.
$factory  : ConnectionFactory
The database connection factory instance.
__call()  : mixed
Dynamically pass methods to the default connection.
__construct()  : void
Create a new database manager instance.
availableDrivers()  : array<string|int, mixed>
Get all of the drivers that are actually available.
connection()  : Connection
Get a database connection instance.
disconnect()  : void
Disconnect from the given database.
extend()  : void
Register an extension connection resolver.
getConnections()  : array<string|int, mixed>
Return all of the created connections.
getDefaultConnection()  : string
Get the default connection name.
purge()  : void
Disconnect from the given database and remove from local cache.
reconnect()  : Connection
Reconnect to the given database.
setDefaultConnection()  : void
Set the default connection name.
supportedDrivers()  : array<string|int, mixed>
Get all of the support drivers.
configuration()  : array<string|int, mixed>
Get the configuration for a connection.
configure()  : Connection
Prepare the database connection instance.
makeConnection()  : Connection
Make the database connection instance.
parseConnectionName()  : array<string|int, mixed>
Parse the connection into an array of the name and read / write type.
refreshPdoConnections()  : Connection
Refresh the PDO connections on a given connection.
setPdoForType()  : Connection
Prepare the read / write mode for database connection instance.

Properties

$connections

The active connection instances.

protected array<string|int, mixed> $connections = []

$extensions

The custom connection resolvers.

protected array<string|int, mixed> $extensions = []

Methods

__call()

Dynamically pass methods to the default connection.

public __call(string $method, array<string|int, mixed> $parameters) : mixed
Parameters
$method : string
$parameters : array<string|int, mixed>
Return values
mixed

availableDrivers()

Get all of the drivers that are actually available.

public availableDrivers() : array<string|int, mixed>
Return values
array<string|int, mixed>

disconnect()

Disconnect from the given database.

public disconnect([string $name = null ]) : void
Parameters
$name : string = null
Return values
void

extend()

Register an extension connection resolver.

public extend(string $name, callable $resolver) : void
Parameters
$name : string
$resolver : callable
Return values
void

getConnections()

Return all of the created connections.

public getConnections() : array<string|int, mixed>
Return values
array<string|int, mixed>

getDefaultConnection()

Get the default connection name.

public getDefaultConnection() : string
Return values
string

purge()

Disconnect from the given database and remove from local cache.

public purge([string $name = null ]) : void
Parameters
$name : string = null
Return values
void

setDefaultConnection()

Set the default connection name.

public setDefaultConnection(string $name) : void
Parameters
$name : string
Return values
void

supportedDrivers()

Get all of the support drivers.

public supportedDrivers() : array<string|int, mixed>
Return values
array<string|int, mixed>

configuration()

Get the configuration for a connection.

protected configuration(string $name) : array<string|int, mixed>
Parameters
$name : string
Tags
throws
InvalidArgumentException
Return values
array<string|int, mixed>

parseConnectionName()

Parse the connection into an array of the name and read / write type.

protected parseConnectionName(string $name) : array<string|int, mixed>
Parameters
$name : string
Return values
array<string|int, mixed>

refreshPdoConnections()

Refresh the PDO connections on a given connection.

protected refreshPdoConnections(string $name) : Connection
Parameters
$name : string
Return values
Connection

Search results