Files
smarty/tests/UnitTests/CacheResourceTests/_shared/PHPunitplugins/cacheresource.filetest.php
2022-11-30 00:25:27 +01:00

19 lines
433 B
PHP

<?php
class Smarty_CacheResource_Filetest extends \Smarty\Cacheresource\File
{
public $lockTime = 0;
public function hasLock(\Smarty\Smarty $smarty, \Smarty_Template_Cached $cached)
{
if ($this->lockTime) {
$this->lockTime--;
if (!$this->lockTime) {
$this->releaseLock($smarty, $cached);
}
}
return parent::hasLock($smarty, $cached);
}
}