You are here

public function Application::addCommands in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/console/Application.php \Symfony\Component\Console\Application::addCommands()

Adds an array of command objects.

Parameters

Command[] $commands An array of commands:

File

vendor/symfony/console/Application.php, line 336

Class

Application
An Application is the container for a collection of commands.

Namespace

Symfony\Component\Console

Code

public function addCommands(array $commands) {
  foreach ($commands as $command) {
    $this
      ->add($command);
  }
}