ConnectionsManagement
in package
Table of Contents
Methods
- action() : mixed
- config() : array<string|int, mixed>
- connection() : mixed
- 运行
- destroy() : void
- get() : ConnectionInterface
- 获取连接 - 手动使用完后请调用release方法归还连接
- initialize() : void
- 初始化
- pool() : Pool|null
- 获取连接池
- pools() : array<string|int, Pool>
- 获取所有连接池
- release() : void
- 归还
Methods
action()
public
static action(callable $action[, string $connection = 'default' ]) : mixed
Parameters
- $action : callable
- $connection : string = 'default'
config()
public
static config(string $connection) : array<string|int, mixed>
Parameters
- $connection : string
Return values
array<string|int, mixed>connection()
运行
public
static connection(callable $action[, string $connection = 'default' ]) : mixed
Parameters
- $action : callable
- $connection : string = 'default'
destroy()
public
static destroy([string $connection = 'default' ]) : void
Parameters
- $connection : string = 'default'
get()
获取连接 - 手动使用完后请调用release方法归还连接
public
static get([string $connection = 'default' ]) : ConnectionInterface
Parameters
- $connection : string = 'default'
Return values
ConnectionInterfaceinitialize()
初始化
public
static initialize([string $connection = 'default' ][, LoggerInterface|null $logger = null ][, string|null $tag = null ]) : void
Parameters
- $connection : string = 'default'
- $logger : LoggerInterface|null = null
- $tag : string|null = null
-
copy mode
pool()
获取连接池
public
static pool([string $connection = 'default' ]) : Pool|null
Parameters
- $connection : string = 'default'
Return values
Pool|nullpools()
获取所有连接池
public
static pools() : array<string|int, Pool>
Return values
array<string|int, Pool>release()
归还
public
static release(ConnectionInterface|null $connectionObject[, string $connection = 'default' ]) : void
Parameters
- $connectionObject : ConnectionInterface|null
- $connection : string = 'default'