ResourcePoolInterface
interface ResourcePoolInterface
ResourcePoolInterface.
Classes implementing this interface represent a pool which contains ResourceInterface objects. This can be used for local storage and to simplify dependency handling between resources.
Methods
bool
get(string $type, string $id, array $options = [])
Returns the resource for the given key.
has(string $type, string $id, array $options = [])
Returns whether the pool contains the given resource.
generateKey(string $type, string $id, array $options = [])
Generates a unique key for the given data.
Details
at line 30
bool
save(ResourceInterface $resource)
Saves the given resource into the pool.
at line 37
get(string $type, string $id, array $options = [])
Returns the resource for the given key.
at line 42
has(string $type, string $id, array $options = [])
Returns whether the pool contains the given resource.
at line 47
generateKey(string $type, string $id, array $options = [])
Generates a unique key for the given data.