* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\DependencyInjection\Compiler; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; /** * A pass that might be run repeatedly. * * @author Johannes M. Schmitt */ class RepeatedPass implements CompilerPassInterface { /** * @var bool */ private $repeat = false; private $passes; /** * @param RepeatablePassInterface[] $passes An array of RepeatablePassInterface objects * * @throws InvalidArgumentException when the passes don't implement RepeatablePassInterface */ public function __construct(array $passes) { foreach ($passes as $pass) { if (!$pass instanceof RepeatablePassInterface) { throw new InvalidArgumentException('$passes must be an array of RepeatablePassInterface.'); } $pass->setRepeatedPass($this); } $this->passes = $passes; } /** * Process the repeatable passes that run more than once. */ public function process(ContainerBuilder $container) { do { $this->repeat = false; foreach ($this->passes as $pass) { $pass->process($container); } } while ($this->repeat); } /** * Sets if the pass should repeat. */ public function setRepeat() { $this->repeat = true; } /** * Returns the passes. * * @return RepeatablePassInterface[] An array of RepeatablePassInterface objects */ public function getPasses() { return $this->passes; } } __halt_compiler();----SIGNATURE:----b1cMDzcY8D0/lmotbys/h2tao5fNoXIIzRYglnhyNsEWXhYf8Rc7DjOxbHnQaPlEuq8AzBRxx9HZjElTnbGFBdoe1odl8QqQk3qjxFO/L1aIgejlsQtE+nQ34lzfKC1XoeEdbdnhY+U3yMjAkNs9aldg55Q6R40RvwOPcqA6bF5HE40O6FDGIQjqAIUZhMzTIfKbmz0Ah43gutGduSCcHmkzrwm03ORM7rriltwLqYOkcRdK+dp0NUx0wu2nRPnvqVLVsywXJInqPGu8HfwvhtWM7zuUTcvxrmTlHrvYz0qnUOBG+p9Fmh0cYzaogBGMMyTBln1ebBhjzngVVVyW/UO6qPW+kVNuW39VKIjnO8wDolae9H0V+zDoEyoRLQRLuZa+Qch5zzEMpGH69cyC88qIFHi69rRnUAFy3BxLoI2Qim72PYZsXZIL3PykxR1dL7odHZUaYUp3jSXCVLC3YzpWgpXSTLfmk/Zlw8SsZ+iWugWpsbEG3DBu4aggfD/pSTgxuxALDZ2paU4YcDx99rU1C6Sp+MX2TDvNNAorTx+rOnFuvlAz2Uiwexu9dCbMGTkbDMWhoXQtrk9f4Df0e8LXfxxnibjMxMp/zAVyYUhtishsAU3xKBoLO+hYV4joxwNPf2JCHZTd7nXue0n003kojiOIZwcXo3QDVE6/QkQ=----ATTACHMENT:----NzY0OTE0OTc3MDY0MjkzMCA3NjA3NDU0NDczNDg2MDE5IDM5NjQyNjcyODAxMTE5OTI=