mirror of
https://github.com/smarty-php/smarty.git
synced 2026-05-04 03:40:53 +02:00
- add concept unique_resource to combat potentially ambiguous template_resource values when custom resource handlers are used (Forum Topic 2012)
http://www.smarty.net/forums/viewtopic.php?t=2012 thereby DRYed and optimized the resource handler identification method.
This commit is contained in:
@@ -59,7 +59,18 @@ class Smarty_Internal_Resource_Stream extends Smarty_Resource_Recompiled {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* modify resource_name according to resource handlers specifications
|
||||
*
|
||||
* @param Smarty $smarty Smarty instance
|
||||
* @param string $resource_name resource_name to make unique
|
||||
* @return string unique resource name
|
||||
*/
|
||||
protected function buildUniqueResourceName(Smarty $smarty, $resource_name)
|
||||
{
|
||||
return get_class($this) . '#' . $resource_name;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user