Manager
class Manager
Traits
Properties
static protected object | $instance | The current globally used instance. |
from CapsuleManagerTrait |
protected Container | $container | The container instance. |
from CapsuleManagerTrait |
protected DatabaseManager | $manager | The database manager instance. |
Methods
Setup the default database configuration options.
Build the database manager instance.
Get a connection instance from the global manager.
Get a registered connection instance.
Register a connection with the manager.
Bootstrap Eloquent so it is ready for usage.
Set the fetch mode for the database connections.
Get the database manager instance.
Get the current event dispatcher instance.
Set the event dispatcher instance to be used by connections.
Dynamically pass methods to the default connection.
Details
in
CapsuleManagerTrait at line 30
protected void
setupContainer(Container $container)
Setup the IoC container instance.
in
CapsuleManagerTrait at line 44
void
setAsGlobal()
Make this capsule instance available globally.
in
CapsuleManagerTrait at line 54
Container
getContainer()
Get the IoC container instance.
in
CapsuleManagerTrait at line 65
void
setContainer(Container $container)
Set the IoC container instance.
at line 30
void
__construct(Container $container = null)
Create a new database capsule manager.
at line 47
protected void
setupDefaultConfiguration()
Setup the default database configuration options.
at line 59
protected void
setupManager()
Build the database manager instance.
at line 72
static Connection
connection(string $connection = null)
Get a connection instance from the global manager.
at line 84
static Builder
table(string $table, string $connection = null)
Get a fluent query builder instance.
at line 95
static Builder
schema(string $connection = null)
Get a schema builder instance.
at line 106
Connection
getConnection(string $name = null)
Get a registered connection instance.
at line 118
void
addConnection(array $config, string $name = 'default')
Register a connection with the manager.
at line 132
void
bootEloquent()
Bootstrap Eloquent so it is ready for usage.
at line 150
$this
setFetchMode(int $fetchMode)
Set the fetch mode for the database connections.
at line 162
DatabaseManager
getDatabaseManager()
Get the database manager instance.
at line 172
Dispatcher|null
getEventDispatcher()
Get the current event dispatcher instance.
at line 185
void
setEventDispatcher(Dispatcher $dispatcher)
Set the event dispatcher instance to be used by connections.
at line 197
static mixed
__callStatic(string $method, array $parameters)
Dynamically pass methods to the default connection.