public function RepeatedPass::__construct

Constructor.

Parameters

array $passes An array of RepeatablePassInterface objects:

Throws

InvalidArgumentException if a pass is not a RepeatablePassInterface instance

File

drupal/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Compiler/RepeatedPass.php, line 33

Class

RepeatedPass
A pass that might be run repeatedly.

Namespace

Symfony\Component\DependencyInjection\Compiler

Code

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;
}