\PG\MSF\BasePool

Class Pool

Summary

Methods
Properties
Constants
getInstance()
get()
push()
$__wrapper
$map
No constants found
No protected methods found
No protected properties found
N/A
__construct()
applyNewPool()
$instance
N/A

Properties

$__wrapper

$__wrapper : \PG\AOP\Wrapper

Type

\PG\AOP\Wrapper — AOP包装器

$map

$map : array

Type

array — 所有内存中的对象,根据类名区分

Methods

getInstance()

getInstance() : \PG\MSF\Base\Pool

产生对象池单例

Returns

\PG\MSF\Base\Pool

get()

get(string  $class, array  $args) : mixed

获取一个

Parameters

string $class

完全命名空间类名

array $args

可变参数列表

Returns

mixed

push()

push(mixed  $classInstance) 

返还一个对象

Parameters

mixed $classInstance

对象实例

__construct()

__construct() 

Pool constructor.

applyNewPool()

applyNewPool(string  $poolName) : mixed

创建新的栈,用于储存相应的对象

Parameters

string $poolName

对象池名称

Throws

\Exception

Returns

mixed