2020-04-13 15:30:52 +02:00
|
|
|
<?php
|
|
|
|
|
|
2022-12-21 16:33:26 +01:00
|
|
|
use Smarty\Resource\FilePlugin;
|
|
|
|
|
|
|
|
|
|
class Smarty_Resource_FiletestPlugin extends FilePlugin
|
2020-04-13 15:30:52 +02:00
|
|
|
{
|
|
|
|
|
/**
|
|
|
|
|
* populate Source Object with meta data from Resource
|
|
|
|
|
*
|
|
|
|
|
* @param Smarty_Template_Source $source source object
|
|
|
|
|
* @param Smarty_Internal_Template $_template template object
|
|
|
|
|
*/
|
|
|
|
|
public function populate(Smarty_Template_Source $source, Smarty_Internal_Template $_template = null)
|
|
|
|
|
{
|
|
|
|
|
parent::populate($source, $_template);
|
|
|
|
|
if ($source->exists) {
|
|
|
|
|
if (isset(CacheResourceTestCommon::$touchResource[$source->filepath])) {
|
|
|
|
|
$source->timestamp = CacheResourceTestCommon::$touchResource[$source->filepath];
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|