Zend Framework  3.0
Public Member Functions | Protected Member Functions | List of all members
ObjectCache Class Reference

Public Member Functions

 setOptions (PatternOptions $options)
 Set options.
 
 call ($method, array $args=[])
 Call and cache a class method.
 
 generateKey ($method, array $args=[])
 Generate a unique key in base of a key representing the callback part and a key representing the arguments part.
 
 __call ($method, array $args)
 Class method call handler.
 
 __set ($name, $value)
 Writing data to properties.
 
 __get ($name)
 Reading data from properties.
 
 __isset ($name)
 Checking existing properties.
 
 __unset ($name)
 Unseting a property.
 
 __toString ()
 Handle casting to string.
 
 __invoke ()
 Handle invoke calls.
 
- Public Member Functions inherited from CallbackCache
 setOptions (PatternOptions $options)
 Set options.
 
 call ($callback, array $args=[])
 Call the specified callback or get the result from cache.
 
 __call ($function, array $args)
 function call handler
 
 generateKey ($callback, array $args=[])
 Generate a unique key in base of a key representing the callback part and a key representing the arguments part.
 
- Public Member Functions inherited from AbstractPattern
 setOptions (PatternOptions $options)
 Set pattern options.
 
 getOptions ()
 Get all pattern options.
 

Protected Member Functions

 generateCallbackKey ($callback, array $args=[])
 Generate a unique key in base of a key representing the callback part and a key representing the arguments part.
 
- Protected Member Functions inherited from CallbackCache
 generateCallbackKey ($callback, array $args)
 Generate a unique key in base of a key representing the callback part and a key representing the arguments part.
 
 generateArgumentsKey (array $args)
 Generate a unique key of the argument part.
 

Additional Inherited Members

- Protected Attributes inherited from AbstractPattern
 $options
 

Member Function Documentation

__call (   $method,
array  $args 
)

Class method call handler.

Parameters
string$methodMethod name to call
array$argsMethod arguments
Returns
mixed
Exceptions
Exception\RuntimeException
\Exception
__get (   $name)

Reading data from properties.

NOTE: Magic properties will be cached too if the option cacheMagicProperties is enabled and the property doesn't exist in real. If so it calls __get.

Parameters
string$name
Returns
mixed
See Also
http://php.net/manual/language.oop5.overloading.php#language.oop5.overloading.members
__invoke ( )
__isset (   $name)

Checking existing properties.

NOTE: Magic properties will be cached too if the option cacheMagicProperties is enabled and the property doesn't exist in real. If so it calls __get.

Parameters
string$name
Returns
bool
See Also
http://php.net/manual/language.oop5.overloading.php#language.oop5.overloading.members
__set (   $name,
  $value 
)

Writing data to properties.

NOTE: Magic properties will be cached too if the option cacheMagicProperties is enabled and the property doesn't exist in real. If so it calls __set and removes cached data of previous __get and __isset calls.

Parameters
string$name
mixed$value
Returns
void
See Also
http://php.net/manual/language.oop5.overloading.php#language.oop5.overloading.members
__toString ( )

Handle casting to string.

Returns
string
See Also
http://php.net/manual/language.oop5.magic.php#language.oop5.magic.tostring
__unset (   $name)

Unseting a property.

NOTE: Magic properties will be cached too if the option cacheMagicProperties is enabled and the property doesn't exist in real. If so it removes previous cached __isset and __get calls.

Parameters
string$name
Returns
void
See Also
http://php.net/manual/language.oop5.overloading.php#language.oop5.overloading.members
call (   $method,
array  $args = [] 
)

Call and cache a class method.

Parameters
string$methodMethod name to call
array$argsMethod arguments
Returns
mixed
Exceptions
Exception\RuntimeException
\Exception
generateCallbackKey (   $callback,
array  $args = [] 
)
protected

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

Parameters
callable$callbackA valid callback
array$argsCallback arguments
Returns
string
Exceptions
Exception\RuntimeException
generateKey (   $method,
array  $args = [] 
)

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

Parameters
string$methodThe method
array$argsCallback arguments
Returns
string
Exceptions
Exception\RuntimeException
setOptions ( PatternOptions  $options)

Set options.

Parameters
PatternOptions$options
Returns
void
Exceptions
Exception\InvalidArgumentException

Implements PatternInterface.