ClassCache
extends CallbackCache
in package
Table of Contents
- $options : PatternOptions
- __call() : mixed
- Calling a method of the entity.
- __get() : mixed
- Get a static property
- __isset() : bool
- Is a static property exists.
- __set() : void
- Set a static property
- __unset() : void
- Unset a static property
- call() : mixed
- Call and cache a class method
- generateKey() : string
- Generate a unique key in base of a key representing the callback part and a key representing the arguments part.
- getOptions() : PatternOptions
- Get all pattern options
- setOptions() : ClassCache
- Set options
- generateArgumentsKey() : string
- Generate a unique key of the argument part.
- generateCallbackKey() : string
- Generate a unique key in base of a key representing the callback part and a key representing the arguments part.
Properties
$options
protected
PatternOptions
$options
Methods
__call()
Calling a method of the entity.
public
__call(string $method, array<string|int, mixed> $args) : mixed
Parameters
- $method : string
-
Method name to call
- $args : array<string|int, mixed>
-
Method arguments
Tags
Return values
mixed —__get()
Get a static property
public
__get(string $name) : mixed
Parameters
- $name : string
Tags
Return values
mixed —__isset()
Is a static property exists.
public
__isset(string $name) : bool
Parameters
- $name : string
Return values
bool —__set()
Set a static property
public
__set(string $name, mixed $value) : void
Parameters
- $name : string
- $value : mixed
Tags
Return values
void —__unset()
Unset a static property
public
__unset(string $name) : void
Parameters
- $name : string
Return values
void —call()
Call and cache a class method
public
call(string $method[, array<string|int, mixed> $args = [] ]) : mixed
Parameters
- $method : string
-
Method name to call
- $args : array<string|int, mixed> = []
-
Method arguments
Tags
Return values
mixed —generateKey()
Generate a unique key in base of a key representing the callback part and a key representing the arguments part.
public
generateKey(string $method[, array<string|int, mixed> $args = [] ]) : string
Parameters
- $method : string
-
The method
- $args : array<string|int, mixed> = []
-
Callback arguments
Tags
Return values
string —getOptions()
Get all pattern options
public
getOptions() : PatternOptions
Return values
PatternOptions —setOptions()
Set options
public
setOptions(PatternOptions $options) : ClassCache
Parameters
- $options : PatternOptions
Tags
Return values
ClassCache —Provides a fluent interface
generateArgumentsKey()
Generate a unique key of the argument part.
protected
generateArgumentsKey(array<string|int, mixed> $args) : string
Parameters
- $args : array<string|int, mixed>
Tags
Return values
string —generateCallbackKey()
Generate a unique key in base of a key representing the callback part and a key representing the arguments part.
protected
generateCallbackKey(callable $callback, array<string|int, mixed> $args) : string
Parameters
- $callback : callable
-
A valid callback
- $args : array<string|int, mixed>
-
Callback arguments