mirror of
https://github.com/smarty-php/smarty.git
synced 2026-05-05 04:04:10 +02:00
- optimization and cleanup of resource code
This commit is contained in:
@@ -13,6 +13,10 @@
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage TemplateResources
|
||||
*
|
||||
* @method renderUncompiled(Smarty_Template_Source $source, Smarty_Internal_Template $_template)
|
||||
* @method populateCompiledFilepath(Smarty_Template_Compiled $compiled, Smarty_Internal_Template $_template)
|
||||
* @method process(Smarty_Internal_Template $_smarty_tpl)
|
||||
*/
|
||||
abstract class Smarty_Resource
|
||||
{
|
||||
@@ -48,7 +52,7 @@ abstract class Smarty_Resource
|
||||
* @var bool
|
||||
*/
|
||||
public $hasCompiledHandler = false;
|
||||
|
||||
|
||||
/**
|
||||
* Load template's source into current template object
|
||||
*
|
||||
@@ -110,7 +114,7 @@ abstract class Smarty_Resource
|
||||
*/
|
||||
public function getBasename(Smarty_Template_Source $source)
|
||||
{
|
||||
return null;
|
||||
return basename(preg_replace('![^\w]+!', '_', $source->name));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user