FilesystemAdapter.php 935 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Symfony\Component\Cache\Adapter;
  11. use Symfony\Component\Cache\Marshaller\DefaultMarshaller;
  12. use Symfony\Component\Cache\Marshaller\MarshallerInterface;
  13. use Symfony\Component\Cache\PruneableInterface;
  14. use Symfony\Component\Cache\Traits\FilesystemTrait;
  15. class FilesystemAdapter extends AbstractAdapter implements PruneableInterface
  16. {
  17. use FilesystemTrait;
  18. public function __construct(string $namespace = '', int $defaultLifetime = 0, ?string $directory = null, ?MarshallerInterface $marshaller = null)
  19. {
  20. $this->marshaller = $marshaller ?? new DefaultMarshaller();
  21. parent::__construct('', $defaultLifetime);
  22. $this->init($namespace, $directory);
  23. }
  24. }