Pool

Protected Properties

AbstractEntity[] $entities = []
 
string[] $ids = []
 

Public Methods

void add (AbstractEntity $entity)
 
null AbstractEntity get (string $key, $caller, Closure $factory)
 
bool has (string $key)
 Polls. More...
 
void remove (... $keys)
 

Protected Methods

void _add (AbstractEntity $entity)
 
void _addKeys (AbstractEntity $entity,... $keys)
 
null AbstractEntity _get (string $key, $caller)
 

Methods

◆ _addKeys()

void _addKeys ( AbstractEntity  $entity,
  $keys 
)
protected
Parameters
AbstractEntity$entity
string[]$keys

◆ _get()

null AbstractEntity _get ( string  $key,
  $caller 
)
protected
Parameters
string$key
Api | Data$caller
Returns
null|AbstractEntity

◆ get()

null AbstractEntity get ( string  $key,
  $caller,
Closure  $factory 
)
final
Parameters
string$key
Api | Data$caller
Closure$factoryfn( $caller ): ?AbstractEntity
Returns
null|AbstractEntity

◆ has()

bool has ( string  $key)

Polls.

Parameters
string$key
Returns
bool

◆ remove()

void remove (   $keys)
Parameters
string[]$keys