PHP Класс LMongo\DatabaseManager

Наследование: implements lmongo\ConnectionResolverInterface
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$app Illuminate\Foundation\Application The application instance.
$connections array The active connection instances.
$extensions array The custom connection resolvers.

Открытые методы

Метод Описание
__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.

Защищенные методы

Метод Описание
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.

Описание методов

__call() публичный Метод

Dynamically pass methods to the default connection.
public __call ( string $method, array $parameters ) : mixed
$method string
$parameters array
Результат mixed

__construct() публичный Метод

Create a new database manager instance.
public __construct ( Illuminate\Foundation\Application $app ) : void
$app Illuminate\Foundation\Application
Результат void

connection() публичный Метод

Get a database connection instance.
public connection ( string $name = null ) : LMongo\Connection
$name string
Результат LMongo\Connection

extend() публичный Метод

Register an extension connection resolver.
public extend ( string $name, callable $resolver ) : void
$name string
$resolver callable
Результат void

getConfig() защищенный Метод

Get the configuration for a connection.
protected getConfig ( string $name ) : array
$name string
Результат array

getDefaultConnection() публичный Метод

Get the default connection name.
public getDefaultConnection ( ) : string
Результат string

makeConnection() защищенный Метод

Make the database connection instance.
protected makeConnection ( string $name ) : Connection
$name string
Результат Connection

prepare() защищенный Метод

Prepare the database connection instance.
protected prepare ( Connection $connection ) : Connection
$connection Connection
Результат Connection

reconnect() публичный Метод

Reconnect to the given database.
public reconnect ( string $name = null ) : Connection
$name string
Результат Connection

setDefaultConnection() публичный Метод

Set the default connection name.
public setDefaultConnection ( string $name ) : void
$name string
Результат void

Описание свойств

$app защищенное свойство

The application instance.
protected Application,Illuminate\Foundation $app
Результат Illuminate\Foundation\Application

$connections защищенное свойство

The active connection instances.
protected array $connections
Результат array

$extensions защищенное свойство

The custom connection resolvers.
protected array $extensions
Результат array