PHP 클래스 LMongo\ConnectionResolver

상속: implements lmongo\ConnectionResolverInterface
파일 보기 프로젝트 열기: navruzm/lmongo

보호된 프로퍼티들

프로퍼티 타입 설명
$connections array All of the registered connections.
$default string The default connection name.

공개 메소드들

메소드 설명
__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.

메소드 상세

__construct() 공개 메소드

Create a new connection resolver instance.
public __construct ( array $connections = [] ) : void
$connections array
리턴 void

addConnection() 공개 메소드

Add a connection to the resolver.
public addConnection ( string $name, Connection $connection ) : void
$name string
$connection Connection
리턴 void

connection() 공개 메소드

Get a database connection instance.
public connection ( string $name = null ) : Illuminate\Database\Connection
$name string
리턴 Illuminate\Database\Connection

getDefaultConnection() 공개 메소드

Get the default connection name.
public getDefaultConnection ( ) : string
리턴 string

hasConnection() 공개 메소드

Check if a connection has been registered.
public hasConnection ( string $name ) : boolean
$name string
리턴 boolean

setDefaultConnection() 공개 메소드

Set the default connection name.
public setDefaultConnection ( string $name ) : void
$name string
리턴 void

프로퍼티 상세

$connections 보호되어 있는 프로퍼티

All of the registered connections.
protected array $connections
리턴 array

$default 보호되어 있는 프로퍼티

The default connection name.
protected string $default
리턴 string