Nenhuma Descrição

Psr6CacheClearer.php 741B

1234567891011121314151617181920212223242526272829303132333435363738
  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\HttpKernel\CacheClearer;
  11. use Psr\Cache\CacheItemPoolInterface;
  12. /**
  13. * @author Nicolas Grekas <p@tchwork.com>
  14. */
  15. class Psr6CacheClearer implements CacheClearerInterface
  16. {
  17. private $pools = array();
  18. public function addPool(CacheItemPoolInterface $pool)
  19. {
  20. $this->pools[] = $pool;
  21. }
  22. /**
  23. * {@inheritdoc}
  24. */
  25. public function clear($cacheDir)
  26. {
  27. foreach ($this->pools as $pool) {
  28. $pool->clear();
  29. }
  30. }
  31. }