Source for file controller.php
Documentation is available at controller.php
* @package Joomla.Platform
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
* @package Joomla.Platform
* @param array $options Array of options
// Overwrite default options with given options
foreach ($options as $option =>
$value)
if (isset
($options[$option]))
$this->options[$option] =
$options[$option];
* Magic method to proxy JCacheControllerMethods
* @param string $name Name of the function
* @param array $arguments Array of arguments for the function
public function __call($name, $arguments)
* Returns a reference to a cache adapter object, always creating it
* @param string $type The cache object type to instantiate; default is output.
* @param array $options Array of options
* @return JCache A JCache object
* @throws RuntimeException
public static function getInstance($type =
'output', $options =
array())
$class =
'JCacheController' .
ucfirst($type);
// Search for the class file in the JCache include paths.
throw
new RuntimeException('Unable to load Cache Controller: ' .
$type, 500);
return new $class($options);
* Set caching enabled state
* @param boolean $enabled True to enable caching
* @param integer $lt Cache lifetime
* Add a directory where JCache should search for controllers. You may
* either pass a string or an array of directories.
* @param string $path A path to search.
* @return array An array with directory elements
if (!empty($path) &&
!in_array($path, $paths))
* Get stored cached data by id and group
* @param string $id The cache data id
* @param string $group The cache data group
* @return mixed False on no result, cached object otherwise
public function get($id, $group =
null)
$locktest =
new stdClass;
$locktest->locked =
null;
$locktest->locklooped =
null;
if ($locktest->locked ==
true &&
$locktest->locklooped ==
true)
if ($locktest->locked ==
true)
// Check again because we might get it from second attempt
// Trim to fix unserialize errors
* Store data to cache by id and group
* @param mixed $data The data to store
* @param string $id The cache data id
* @param string $group The cache data group
* @param boolean $wrkarounds True to use wrkarounds
* @return boolean True if cache stored
public function store($data, $id, $group =
null, $wrkarounds =
true)
$locktest =
new stdClass;
$locktest->locked =
null;
$locktest->locklooped =
null;
if ($locktest->locked ==
false &&
$locktest->locklooped ==
true)
if ($locktest->locked ==
true)
Documentation generated on Tue, 19 Nov 2013 14:57:05 +0100 by phpDocumentor 1.4.3