CallbackController
class CallbackController extends CacheController
Joomla! Cache callback type object
Properties
Cache | $cache | Cache object | from CacheController |
array | $options | Array of options | from CacheController |
Methods
Magic method to proxy CacheController method calls to Cache
Returns a reference to a cache adapter object, always creating it
Add a directory where Cache should search for controllers. You may either pass a string or an array of directories.
Executes a cacheable callback if not found in cache else returns cached output and result
Store data to cache by ID and group
Executes a cacheable callback if not found in cache else returns cached output and result
Details
mixed
__call(
string $name,
array $arguments)
Magic method to proxy CacheController method calls to Cache
static
CacheController
getInstance(
string $type = 'output',
array $options = array())
Returns a reference to a cache adapter object, always creating it
static
array
addIncludePath(
array|string $path = '')
Add a directory where Cache should search for controllers. You may either pass a string or an array of directories.
mixed
get(
mixed $callback,
array $args = array(),
string $id = false,
boolean $wrkarounds = false,
array $woptions = array())
Executes a cacheable callback if not found in cache else returns cached output and result
boolean
store(
mixed $data,
string $id,
string $group = null,
boolean $wrkarounds = true)
Store data to cache by ID and group
mixed
call()
Executes a cacheable callback if not found in cache else returns cached output and result
Since arguments to this function are read with funcgetargs you can pass any number of arguments to this method as long as the first argument passed is the callback definition.
The callback definition can be in several forms: - Standard PHP Callback array see https://secure.php.net/callback [recommended] - Function name as a string eg. 'foo' for function foo() - Static method name as a string eg. 'MyClass::myMethod' for method myMethod() of class MyClass