Class JCacheControllerCallback

Description

Joomla! Cache callback type object

  • since: 11.1

Located in /libraries/joomla/cache/controller/callback.php (line 19)

JCacheController
   |
   --JCacheControllerCallback
Method Summary
 mixed call ()
 mixed get (mixed $callback, [array $args = array()], [string $id = false], [boolean $wrkarounds = false], [array $woptions = array()])
 string _makeId (callback $callback, array $args)
Variables
Methods
call (line 37)

Executes a cacheable callback if not found in cache else returns cached output and result

Since arguments to this function are read with func_get_args 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 <http://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

  • return: Result of the callback
  • since: 11.1
  • access: public
mixed call ()
get (line 59)

Executes a cacheable callback if not found in cache else returns cached output and result

  • return: Result of the callback
  • since: 11.1
  • access: public
mixed get (mixed $callback, [array $args = array()], [string $id = false], [boolean $wrkarounds = false], [array $woptions = array()])
  • mixed $callback: Callback or string shorthand for a callback
  • array $args: Callback arguments
  • string $id: Cache id
  • boolean $wrkarounds: True to use wrkarounds
  • array $woptions: Workaround options

Redefinition of:
JCacheController::get()
Get stored cached data by id and group
_makeId (line 194)

Generate a callback cache id

  • return: MD5 Hash : function cache id
  • since: 11.1
  • access: protected
string _makeId (callback $callback, array $args)
  • callback $callback: Callback to cache
  • array $args: Arguments to the callback method to cache

Inherited Methods

Inherited From JCacheController

 JCacheController::__construct()
 JCacheController::addIncludePath()
 JCacheController::get()
 JCacheController::getInstance()
 JCacheController::setCaching()
 JCacheController::setLifeTime()
 JCacheController::store()
 JCacheController::__call()

Documentation generated on Tue, 19 Nov 2013 14:55:00 +0100 by phpDocumentor 1.4.3