mirror of
https://github.com/smarty-php/smarty.git
synced 2025-12-16 02:28:31 +01:00
rework source resource handling
- move class Smarty_Template_Source into its own file - impelement all source processing into the classes it better belongs to
This commit is contained in:
@@ -9,8 +9,14 @@
|
||||
* @author Uwe Tews
|
||||
* @author Rodney Rehm
|
||||
*/
|
||||
class Smarty_Internal_Resource_Php extends Smarty_Resource_Uncompiled
|
||||
class Smarty_Internal_Resource_PHP extends Smarty_Internal_Resource_File
|
||||
{
|
||||
/**
|
||||
* Flag that it's an uncompiled resource
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
public $uncompiled = true;
|
||||
/**
|
||||
* container for short_open_tag directive's value before executing PHP templates
|
||||
*
|
||||
@@ -116,4 +122,17 @@ class Smarty_Internal_Resource_Php extends Smarty_Resource_Uncompiled
|
||||
include($source->filepath);
|
||||
ini_set('short_open_tag', $this->short_open_tag);
|
||||
}
|
||||
|
||||
/**
|
||||
* populate compiled object with compiled filepath
|
||||
*
|
||||
* @param Smarty_Template_Compiled $compiled compiled object
|
||||
* @param Smarty_Internal_Template $_template template object (is ignored)
|
||||
*/
|
||||
public function populateCompiledFilepath(Smarty_Template_Compiled $compiled, Smarty_Internal_Template $_template)
|
||||
{
|
||||
$compiled->filepath = false;
|
||||
$compiled->timestamp = false;
|
||||
$compiled->exists = false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user