JCache/getStores
From Joomla! Documentation
< API15:JCache
The "API15" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.
Description[edit]
Get the storage handlers
[<! removed edit link to red link >]
<! removed transcluded page call, red link never existed >
Syntax[edit]
getStores()
Returns[edit]
array An array of available storage handlers
Defined in[edit]
libraries/joomla/cache/cache.php
Importing[edit]
jimport( 'joomla.cache.cache' );
Source Body[edit]
function getStores()
{
jimport('joomla.filesystem.folder');
$handlers = JFolder::files(dirname(__FILE__).DS.'storage', '.php$');
$names = array();
foreach($handlers as $handler)
{
$name = substr($handler, 0, strrpos($handler, '.'));
$class = 'JCacheStorage'.$name;
if(!class_exists($class)) {
require_once(dirname(__FILE__).DS.'storage'.DS.$name.'.php');
}
if(call_user_func_array( array( trim($class), 'test' ), array())) {
$names[] = $name;
}
}
return $names;
}
[<! removed edit link to red link >] <! removed transcluded page call, red link never existed >
Examples[edit]
Code Examples[edit]