1234567891011121314151617181920212223242526272829303132333435363738 |
- <?php
- namespace Symfony\Component\Cache\Adapter;
- use Symfony\Component\Cache\Exception\CacheException;
- use Symfony\Component\Cache\PruneableInterface;
- use Symfony\Component\Cache\Traits\PhpFilesTrait;
- class PhpFilesAdapter extends AbstractAdapter 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);
- };
- }
- }
|