123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- <?php
- namespace Symfony\Component\Cache\Simple;
- use Symfony\Component\Cache\Adapter\PhpFilesAdapter;
- use Symfony\Component\Cache\Exception\CacheException;
- use Symfony\Component\Cache\PruneableInterface;
- use Symfony\Component\Cache\Traits\PhpFilesTrait;
- use Symfony\Contracts\Cache\CacheInterface;
- @trigger_error(sprintf('The "%s" class is deprecated since Symfony 4.3, use "%s" and type-hint for "%s" instead.', PhpFilesCache::class, PhpFilesAdapter::class, CacheInterface::class), \E_USER_DEPRECATED);
- class PhpFilesCache extends AbstractCache implements PruneableInterface
- {
- use PhpFilesTrait;
-
- public function __construct(string $namespace = '', int $defaultLifetime = 0, string $directory = null, bool $appendOnly = false)
- {
- $this->appendOnly = $appendOnly;
- self::$startTime = self::$startTime ?? $_SERVER['REQUEST_TIME'] ?? time();
- parent::__construct('', $defaultLifetime);
- $this->init($namespace, $directory);
- $this->includeHandler = static function ($type, $msg, $file, $line) {
- throw new \ErrorException($msg, 0, $type, $file, $line);
- };
- }
- }
|