/**
* Delete compiled template file
*
* @param string $resource_name template name
* @param string $compile_id compile id
* @param integer $exp_time expiration time
* @param Smarty $smarty Smarty instance
* @return integer number of template files deleted
*/
public static function clearCompiledTemplate($resource_name,
$compile_id,
$exp_time, Smarty
$smarty) { $_compile_dir =
$smarty->
getCompileDir();
$_compile_id =
isset($compile_id) ?
preg_replace('![^\w\|]+!', '_',
$compile_id) : null;
$_dir_sep =
$smarty->use_sub_dirs ? DS : '^';
if (isset($resource_name)) { $_save_stat =
$smarty->caching;
$smarty->caching = false;
$tpl =
new $smarty->
template_class($resource_name,
$smarty);
$smarty->caching =
$_save_stat;
// remove from template cache
$tpl->source; // have the template registered before unset()
if ($smarty->allow_ambiguous_resources
) {