\Yesf\ConnectionPool

Summary

Methods
Properties
Constants
init()
getMin()
getMax()
get()
close()
getAdapter()
setDriver()
setAdapter()
No public properties found
No constants found
No protected methods found
$connection_default
$driver
$created_driver
$adapter
$created_adapter
N/A
No private methods found
No private properties found
N/A

Properties

$connection_default

$connection_default : 

Type

$driver

$driver : 

Type

$created_driver

$created_driver : 

Type

$adapter

$adapter : 

Type

$created_adapter

$created_adapter : 

Type

Methods

init()

init() 

init阶段,读取基本配置

getMin()

getMin() : integer

Get min connection count

Returns

integer

getMax()

getMax() : integer

Get max connection count

Returns

integer

get()

get(mixed  $config = null) : object

Get a connection

Parameters

mixed $config

Returns

object

close()

close(  $config = null) 

Close connections

Parameters

$config

getAdapter()

getAdapter(mixed  $config = null) : object

Get a connection with Adapter If $config is string, this function will get config from Yesf::app()->getConfig If $config is array, this function will use it directly

Parameters

mixed $config

Returns

object

setDriver()

setDriver(string  $type, string  $className) 

注册自定义Driver

Parameters

string $type
string $className

类名

setAdapter()

setAdapter(string  $type, string  $className) 

注册自定义Adapter

Parameters

string $type
string $className

类名