You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

smarty_resource_uncompiled.php 1.4KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php
  2. /**
  3. * Smarty Resource Plugin
  4. *
  5. * @package Smarty
  6. * @subpackage TemplateResources
  7. * @author Rodney Rehm
  8. */
  9. /**
  10. * Smarty Resource Plugin
  11. * Base implementation for resource plugins that don't use the compiler
  12. *
  13. * @package Smarty
  14. * @subpackage TemplateResources
  15. */
  16. abstract class Smarty_Resource_Uncompiled extends Smarty_Resource
  17. {
  18. /**
  19. * Flag that it's an uncompiled resource
  20. *
  21. * @var bool
  22. */
  23. public $uncompiled = true;
  24. /**
  25. * Resource does implement populateCompiledFilepath() method
  26. *
  27. * @var bool
  28. */
  29. public $hasCompiledHandler = true;
  30. /**
  31. * populate compiled object with compiled filepath
  32. *
  33. * @param Smarty_Template_Compiled $compiled compiled object
  34. * @param Smarty_Internal_Template $_template template object
  35. */
  36. public function populateCompiledFilepath(Smarty_Template_Compiled $compiled, Smarty_Internal_Template $_template)
  37. {
  38. $compiled->filepath = $_template->source->filepath;
  39. $compiled->timestamp = $_template->source->timestamp;
  40. $compiled->exists = $_template->source->exists;
  41. if ($_template->smarty->merge_compiled_includes || $_template->source->handler->checkTimestamps()) {
  42. $compiled->file_dependency[ $_template->source->uid ] =
  43. array($compiled->filepath, $compiled->timestamp, $_template->source->type,);
  44. }
  45. }
  46. }