PHP Class LMongo\DatabaseManager

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

Protected Properties

Свойство Type Description
$app Illuminate\Foundation\Application The application instance.
$connections array The active connection instances.
$extensions array The custom connection resolvers.

Méthodes publiques

Méthode Description
__call ( string $method, array $parameters ) : mixed Dynamically pass methods to the default connection.
__construct ( Illuminate\Foundation\Application $app ) : void Create a new database manager instance.
connection ( string $name = null ) : LMongo\Connection Get a database connection instance.
extend ( string $name, callable $resolver ) : void Register an extension connection resolver.
getDefaultConnection ( ) : string Get the default connection name.
reconnect ( string $name = null ) : Connection Reconnect to the given database.
setDefaultConnection ( string $name ) : void Set the default connection name.

Méthodes protégées

Méthode Description
getConfig ( string $name ) : array Get the configuration for a connection.
makeConnection ( string $name ) : Connection Make the database connection instance.
prepare ( Connection $connection ) : Connection Prepare the database connection instance.

Method Details

__call() public méthode

Dynamically pass methods to the default connection.
public __call ( string $method, array $parameters ) : mixed
$method string
$parameters array
Résultat mixed

__construct() public méthode

Create a new database manager instance.
public __construct ( Illuminate\Foundation\Application $app ) : void
$app Illuminate\Foundation\Application
Résultat void

connection() public méthode

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

extend() public méthode

Register an extension connection resolver.
public extend ( string $name, callable $resolver ) : void
$name string
$resolver callable
Résultat void

getConfig() protected méthode

Get the configuration for a connection.
protected getConfig ( string $name ) : array
$name string
Résultat array

getDefaultConnection() public méthode

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

makeConnection() protected méthode

Make the database connection instance.
protected makeConnection ( string $name ) : Connection
$name string
Résultat Connection

prepare() protected méthode

Prepare the database connection instance.
protected prepare ( Connection $connection ) : Connection
$connection Connection
Résultat Connection

reconnect() public méthode

Reconnect to the given database.
public reconnect ( string $name = null ) : Connection
$name string
Résultat Connection

setDefaultConnection() public méthode

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

Property Details

$app protected_oe property

The application instance.
protected Application,Illuminate\Foundation $app
Résultat Illuminate\Foundation\Application

$connections protected_oe property

The active connection instances.
protected array $connections
Résultat array

$extensions protected_oe property

The custom connection resolvers.
protected array $extensions
Résultat array