* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\HttpKernel\CacheWarmer; /** * Aggregates several cache warmers into a single one. * * @author Fabien Potencier * * @final since version 3.4 */ class CacheWarmerAggregate implements CacheWarmerInterface { protected $warmers = array(); protected $optionalsEnabled = false; private $triggerDeprecation = false; public function __construct($warmers = array()) { foreach ($warmers as $warmer) { $this->add($warmer); } $this->triggerDeprecation = true; } public function enableOptionalWarmers() { $this->optionalsEnabled = true; } /** * Warms up the cache. * * @param string $cacheDir The cache directory */ public function warmUp($cacheDir) { foreach ($this->warmers as $warmer) { if (!$this->optionalsEnabled && $warmer->isOptional()) { continue; } $warmer->warmUp($cacheDir); } } /** * Checks whether this warmer is optional or not. * * @return bool always false */ public function isOptional() { return false; } /** * @deprecated since version 3.4, to be removed in 4.0, inject the list of clearers as a constructor argument instead. */ public function setWarmers(array $warmers) { @trigger_error(sprintf('The "%s()" method is deprecated since Symfony 3.4 and will be removed in 4.0, inject the list of clearers as a constructor argument instead.', __METHOD__), E_USER_DEPRECATED); $this->warmers = array(); foreach ($warmers as $warmer) { $this->add($warmer); } } /** * @deprecated since version 3.4, to be removed in 4.0, inject the list of clearers as a constructor argument instead. */ public function add(CacheWarmerInterface $warmer) { if ($this->triggerDeprecation) { @trigger_error(sprintf('The "%s()" method is deprecated since Symfony 3.4 and will be removed in 4.0, inject the list of clearers as a constructor argument instead.', __METHOD__), E_USER_DEPRECATED); } $this->warmers[] = $warmer; } } __halt_compiler();----SIGNATURE:----jwcC98qCmcG3y7UEur9yzpwmXPqFKCSiBUpstDbIgWo2jvg2YpmqmhU27XRimzuB4jr98Q9XrzCyCzrgCzov3V7FgyRDNG7lVNwvTpLl3f1/c957IEmwXOOo7wWvIS+4VNsUKYvwMSWqnwOymiK4jAvxPo6jAa9VI5IPBzB7m2fX1Bk18XIBXRT6YUQsFxwBVLwp5zOF4K3KEjaDiCmMQr1dAXfBNg115dDQY0o4vx3MuhLF68eRXd6gPZ1YpQ8aL/QqDAsMlRg3isA2dDzS0szwXWtYHBCkKBJ3F24rYQYjeuJ8/spxIJgMbG6EZqgjhp7yFhjNzpj0bVKKLaE1DjEv3RAsptALznxU2c1p8mpaLYSR85PNr+FoE3bNZRlLlH/R/APhMFd6fWGMzWlgG1Be3zbtCbqzUtv97MukI64nIXtpVsYwrrcf5Ht1SC3/7S4IlbQ2KdpeAvCppQ9gsgnDUqcnlpOpUzo/iViEio4mAIx+a3DZEx+/EzKpt3dAZ8w2UvR0cFDz4k1H+7v9GqHLvUIU8GMZvhRV1jqJhoWJ9q1bV6htKPPUWYEcqraS+4h9AwLKonuLG5Sc2jFgcJl3n5qFnmzzz9NlRwky/P5Nbke5cP/XH9mkcic5YWwtfk4eSG0xog2zTpCCChM9O2c1r+Sz/RvgVhPJt64CO7Q=----ATTACHMENT:----MzMxNjYzNzM2OTQ0NjM5NCAzNTA5NjI3OTczMzgwMjMxIDE5NjkxNTMyMjI3NjgyMjc=