4 * Smarty Method UnregisterResource
6 * Smarty::unregisterResource() method
9 * @subpackage PluginsInternal
12 class Smarty_Internal_Method_UnregisterResource
15 * Valid for Smarty and template object
22 * Registers a resource to fetch a template
24 * @api Smarty::unregisterResource()
25 * @link http://www.smarty.net/docs/en/api.unregister.resource.tpl
27 * @param \Smarty_Internal_TemplateBase|\Smarty_Internal_Template|\Smarty $obj
28 * @param string $type name of resource type
30 * @return \Smarty|\Smarty_Internal_Template
32 public function unregisterResource(Smarty_Internal_TemplateBase $obj, $type)
34 $smarty = $obj->_getSmartyObj();
35 if (isset($smarty->registered_resources[ $type ])) {
36 unset($smarty->registered_resources[ $type ]);