* * 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:----WR12WHxXCHAeI2fc/GzwUP3e9wYCD39l3Zc4zUTwlXixYawlpGhRgXJCcSwzrhJW0O4g7ns8a4WRWrCLHfZGCas4OMPyLMYcS0oaOm8doeco1Dl9uNc/gj7q7hRArcp+AUCrxzE4SwfvEZrrrgXHoJAHEG/ostCEvVfz2R6Ql1Hxexk6jfowrhAEaQd5qdiB6kpCRaxAfCk2sdfBpHW3+9ZI/WuMx9jP9PJQ7gdYfOOIaEq8a9a2jJ8Qtutt9YG+TBJoYiRMYeMNdDlus9IS5xx4Kz6liTuwLqt4CLx4atlsP+FNc9Cu5Ibty64GWX5kIEvzAPeaaoeKb6WGpO0zd74j7+EK6NdIUPTvpOXRSQ1WMAd255XCJqc98oh5g43GOPUVuV+91vtawRn2XBqzZgDpXiP4lWcgzwz2r0i8Y6ytSw+p4TpRHsg14hrLkabww6fnOr3KNms28JuYs9tPutvQsaiOJyS9jxOEENkdK4ZW/McMMHuAUuGdsnoLcSHnQxtYOMoNjBD281bR/2msLKHv7onZPYTxAiYsupOY4gMG2Tb3IfGc7IRwdq1Phw1gRSxbxWky2Yydog3MGtah966G0Ld+fAVQNHpgOhzZ63OrQqiBxZCWZf8299a/QHboaW0/syQJH04JUi14igS1pLVnR/2/s8dEno///e5OuAg=----ATTACHMENT:----Njg3MTEyNzQ2ODk5ODI3OSA0OTYyNTIyNDc5MDE0NzI3IDYzMjExODY3MTIwNTUwNzg=