[ Index ]

PHP Cross Reference of phpBB-3.2.11-deutsch

title

Body

[close]

/vendor/symfony/http-kernel/CacheClearer/ -> ChainCacheClearer.php (source)

   1  <?php
   2  
   3  /*
   4   * This file is part of the Symfony package.
   5   *
   6   * (c) Fabien Potencier <fabien@symfony.com>
   7   *
   8   * For the full copyright and license information, please view the LICENSE
   9   * file that was distributed with this source code.
  10   */
  11  
  12  namespace Symfony\Component\HttpKernel\CacheClearer;
  13  
  14  /**
  15   * ChainCacheClearer.
  16   *
  17   * @author Dustin Dobervich <ddobervich@gmail.com>
  18   */
  19  class ChainCacheClearer implements CacheClearerInterface
  20  {
  21      protected $clearers;
  22  
  23      /**
  24       * Constructs a new instance of ChainCacheClearer.
  25       *
  26       * @param array $clearers The initial clearers
  27       */
  28      public function __construct(array $clearers = array())
  29      {
  30          $this->clearers = $clearers;
  31      }
  32  
  33      /**
  34       * {@inheritdoc}
  35       */
  36      public function clear($cacheDir)
  37      {
  38          foreach ($this->clearers as $clearer) {
  39              $clearer->clear($cacheDir);
  40          }
  41      }
  42  
  43      /**
  44       * Adds a cache clearer to the aggregate.
  45       */
  46      public function add(CacheClearerInterface $clearer)
  47      {
  48          $this->clearers[] = $clearer;
  49      }
  50  }


Generated: Wed Nov 11 20:33:01 2020 Cross-referenced by PHPXref 0.7.1