Class Guzzle\Cache\ClosureCacheAdapter

InheritanceGuzzle\Cache\ClosureCacheAdapter
ImplementsGuzzle\Cache\CacheAdapterInterface

Cache adapter that defers to closures for implementation

Protected Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$callables array Mapping of method names to callables Guzzle\Cache\ClosureCacheAdapter

Property Details

$callables protected property

Mapping of method names to callables

protected array $callables null

Method Details

__construct() public method

The callables array is an array mapping the actions of the cache adapter to callables.

  • contains: Callable that accepts an $id and $options argument
  • delete: Callable that accepts an $id and $options argument
  • fetch: Callable that accepts an $id and $options argument
  • save: Callable that accepts an $id, $data, $lifeTime, and $options argument
public void __construct ( array $callables )
$callables array

Array of action names to callable

throws InvalidArgumentException

if the callable is not callable

contains() public method

public void contains ( $id, array $options null )
$id
$options
delete() public method

public void delete ( $id, array $options null )
$id
$options
fetch() public method

public void fetch ( $id, array $options null )
$id
$options
save() public method

public void save ( $id, $data, $lifeTime false, array $options null )
$id
$data
$lifeTime
$options