ChainCacheClearer.
@author Dustin Dobervich <ddobervich@gmail.com>
Expanded class hierarchy of ChainCacheClearer
class ChainCacheClearer implements CacheClearerInterface {
/**
* @var array $clearers
*/
protected $clearers;
/**
* Constructs a new instance of ChainCacheClearer.
*
* @param array $clearers The initial clearers.
*/
public function __construct(array $clearers = array()) {
$this->clearers = $clearers;
}
/**
* {@inheritDoc}
*/
public function clear($cacheDir) {
foreach ($this->clearers as $clearer) {
$clearer
->clear($cacheDir);
}
}
/**
* Adds a cache clearer to the aggregate.
*
* @param CacheClearerInterface $clearer
*/
public function add(CacheClearerInterface $clearer) {
$this->clearers[] = $clearer;
}
}
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ChainCacheClearer:: |
protected | property | ||
ChainCacheClearer:: |
public | function | Adds a cache clearer to the aggregate. | |
ChainCacheClearer:: |
public | function |
Clears any caches necessary. Overrides CacheClearerInterface:: |
|
ChainCacheClearer:: |
public | function | Constructs a new instance of ChainCacheClearer. |