class Manager (View source)

Traits

Methods

void
setAsGlobal()

Make this capsule instance available globally.

getContainer()

Get the IoC container instance.

void
setContainer( Container $container)

Set the IoC container instance.

void
__construct( Container $container = null)

Create a new database capsule manager.

static  Connection
connection( string $connection = null)

Get a connection instance from the global manager.

static  Builder
table( string $table, string $connection = null)

Get a fluent query builder instance.

static  Builder
schema( string $connection = null)

Get a schema builder instance.

getConnection( string $name = null)

Get a registered connection instance.

void
addConnection( array $config, string $name = 'default')

Register a connection with the manager.

void
bootEloquent()

Bootstrap Eloquent so it is ready for usage.

$this
setFetchMode( int $fetchMode)

Set the fetch mode for the database connections.

getDatabaseManager()

Get the database manager instance.

Dispatcher|null
getEventDispatcher()

Get the current event dispatcher instance.

void
setEventDispatcher( Dispatcher $dispatcher)

Set the event dispatcher instance to be used by connections.

static  mixed
__callStatic( string $method, array $parameters)

Dynamically pass methods to the default connection.

Details

void setAsGlobal()

Make this capsule instance available globally.

Return Value

void

Container getContainer()

Get the IoC container instance.

Return Value

Container

void setContainer( Container $container)

Set the IoC container instance.

Parameters

Container $container

Return Value

void

at line line 30
void __construct( Container $container = null)

Create a new database capsule manager.

Parameters

Container $container

Return Value

void

at line line 72
static Connection connection( string $connection = null)

Get a connection instance from the global manager.

Parameters

string $connection

Return Value

Connection

at line line 84
static Builder table( string $table, string $connection = null)

Get a fluent query builder instance.

Parameters

string $table
string $connection

Return Value

Builder

at line line 95
static Builder schema( string $connection = null)

Get a schema builder instance.

Parameters

string $connection

Return Value

Builder

at line line 106
Connection getConnection( string $name = null)

Get a registered connection instance.

Parameters

string $name

Return Value

Connection

at line line 118
void addConnection( array $config, string $name = 'default')

Register a connection with the manager.

Parameters

array $config
string $name

Return Value

void

at line line 132
void bootEloquent()

Bootstrap Eloquent so it is ready for usage.

Return Value

void

at line line 150
$this setFetchMode( int $fetchMode)

Set the fetch mode for the database connections.

Parameters

int $fetchMode

Return Value

$this

at line line 162
DatabaseManager getDatabaseManager()

Get the database manager instance.

Return Value

DatabaseManager

at line line 172
Dispatcher|null getEventDispatcher()

Get the current event dispatcher instance.

Return Value

Dispatcher|null

at line line 185
void setEventDispatcher( Dispatcher $dispatcher)

Set the event dispatcher instance to be used by connections.

Parameters

Dispatcher $dispatcher

Return Value

void

at line line 197
static mixed __callStatic( string $method, array $parameters)

Dynamically pass methods to the default connection.

Parameters

string $method
array $parameters

Return Value

mixed