PHP Class LMongo\ConnectionResolver

Inheritance: implements lmongo\ConnectionResolverInterface
Afficher le fichier Open project: navruzm/lmongo

Protected Properties

Свойство Type Description
$connections array All of the registered connections.
$default string The default connection name.

Méthodes publiques

Méthode Description
__construct ( array $connections = [] ) : void Create a new connection resolver instance.
addConnection ( string $name, Connection $connection ) : void Add a connection to the resolver.
connection ( string $name = null ) : Illuminate\Database\Connection Get a database connection instance.
getDefaultConnection ( ) : string Get the default connection name.
hasConnection ( string $name ) : boolean Check if a connection has been registered.
setDefaultConnection ( string $name ) : void Set the default connection name.

Method Details

__construct() public méthode

Create a new connection resolver instance.
public __construct ( array $connections = [] ) : void
$connections array
Résultat void

addConnection() public méthode

Add a connection to the resolver.
public addConnection ( string $name, Connection $connection ) : void
$name string
$connection Connection
Résultat void

connection() public méthode

Get a database connection instance.
public connection ( string $name = null ) : Illuminate\Database\Connection
$name string
Résultat Illuminate\Database\Connection

getDefaultConnection() public méthode

Get the default connection name.
public getDefaultConnection ( ) : string
Résultat string

hasConnection() public méthode

Check if a connection has been registered.
public hasConnection ( string $name ) : boolean
$name string
Résultat boolean

setDefaultConnection() public méthode

Set the default connection name.
public setDefaultConnection ( string $name ) : void
$name string
Résultat void

Property Details

$connections protected_oe property

All of the registered connections.
protected array $connections
Résultat array

$default protected_oe property

The default connection name.
protected string $default
Résultat string