4 * Smarty Method RegisterCacheResource
6 * Smarty::registerCacheResource() method
9 * @subpackage PluginsInternal
12 class Smarty_Internal_Method_RegisterCacheResource
15 * Valid for Smarty and template object
22 * Registers a resource to fetch a template
24 * @api Smarty::registerCacheResource()
25 * @link http://www.smarty.net/docs/en/api.register.cacheresource.tpl
27 * @param \Smarty_Internal_TemplateBase|\Smarty_Internal_Template|\Smarty $obj
28 * @param string $name name of resource type
29 * @param \Smarty_CacheResource $resource_handler
31 * @return \Smarty|\Smarty_Internal_Template
33 public function registerCacheResource(Smarty_Internal_TemplateBase $obj, $name,
34 Smarty_CacheResource $resource_handler)
36 $smarty = $obj->_getSmartyObj();
37 $smarty->registered_cache_resources[ $name ] = $resource_handler;