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:
Uwe Tews
2015-01-01 23:34:29 +01:00
parent dd2d24d1d6
commit c3aa9994c8
13 changed files with 533 additions and 699 deletions

View File

@@ -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;
}
}