package Default
inherited_from \Zend\Cache\Pattern\AbstractPattern

 Methods

function call handler

__call(string $function, array $args) : mixed

Parameters

$function

string

Function name to call

$args

array

Function arguments

Exceptions

\Zend\Cache\Exception\RuntimeException
\Exception

Returns

mixed

Call the specified callback or get the result from cache

call(callable $callback, array $args = array()) : mixed

Parameters

$callback

callable

A valid callback

$args

array

Callback arguments

Exceptions

\Zend\Cache\Exception\RuntimeException if invalid cached data
\Exception

Returns

mixedResult

Generate a unique key in base of a key representing the callback part and a key representing the arguments part.

generateKey(callable $callback, array $args = array()) : string

Parameters

$callback

callable

A valid callback

$args

array

Callback arguments

Exceptions

\Zend\Cache\Exception\RuntimeException
\Zend\Cache\Exception\InvalidArgumentException

Returns

string

Get all pattern options

getOptions() : \Zend\Cache\Pattern\PatternOptions
Inherited
inherited_from \Zend\Cache\Pattern\PatternInterface::getOptions()

Returns

\Zend\Cache\Pattern\PatternOptions

Set options

setOptions(\Zend\Cache\Pattern\PatternOptions $options) : \Zend\Cache\Pattern\CallbackCache
inherited_from \Zend\Cache\Pattern\AbstractPattern::setOptions()

Parameters

$options

\Zend\Cache\Pattern\PatternOptions

Exceptions

\Zend\Cache\Exception\InvalidArgumentException if missing storage option

Returns

\Zend\Cache\Pattern\CallbackCache

Set pattern options

setOptions(\Zend\Cache\Pattern\PatternOptions $options) : \Zend\Cache\Pattern\AbstractPattern
Inherited
inherited_from \Zend\Cache\Pattern\PatternInterface::setOptions()

Parameters

$options

\Zend\Cache\Pattern\PatternOptions

Exceptions

\Zend\Cache\Exception\InvalidArgumentException

Returns

\Zend\Cache\Pattern\AbstractPattern

Generate a unique key of the argument part.

generateArgumentsKey(array $args) : string

Parameters

$args

array

Exceptions

\Zend\Cache\Exception\RuntimeException

Returns

string

Generate a unique key in base of a key representing the callback part and a key representing the arguments part.

generateCallbackKey(callable $callback, array $args) : string

Parameters

$callback

callable

A valid callback

$args

array

Callback arguments

Exceptions

\Zend\Cache\Exception\RuntimeException if callback not serializable
\Zend\Cache\Exception\InvalidArgumentException if invalid callback

Returns

string

 Properties

 

$options

$options : \Zend\Cache\Pattern\PatternOptions

Default