\rex_instance_list_pool_trait

Instance List Pool Trait.

Summary

Methods
Properties
Constants
clearInstanceList()
clearInstanceListPool()
No public properties found
No constants found
addInstanceList()
hasInstanceList()
getInstanceList()
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

clearInstanceList()

clearInstanceList(mixed  $key) : mixed

Clears the instance list of the given key.

Parameters

mixed $key

Key

Returns

mixed —

clearInstanceListPool()

clearInstanceListPool() : mixed

Clears the instance list pool.

Returns

mixed —

addInstanceList()

addInstanceList(mixed  $key, array  $instanceKeyList) : mixed

Adds an instance list.

Parameters

mixed $key

Key

array $instanceKeyList

Array of instance keys

Returns

mixed —

hasInstanceList()

hasInstanceList(mixed  $key) : bool

Checks whether an instance list exists for the given key.

Parameters

mixed $key

Key

Returns

bool —

getInstanceList()

getInstanceList(mixed  $key, callable  $getInstanceCallback, callable|null  $createListCallback = null) : array

Returns the instance list for the given key.

If the instance list does not exist it will be created by calling the $createListCallback

Parameters

mixed $key

Key

callable $getInstanceCallback

Callback, will be called for every list item to get the instance

callable|null $createListCallback

Callback, will be called to create the list of instance keys

Returns

array —