You are here

public function Application::register in Zircon Profile 8.0

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

Registers a new command.

Parameters

string $name The command name:

Return value

Command The newly created command

File

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

Class

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

Namespace

Symfony\Component\Console

Code

public function register($name) {
  return $this
    ->add(new Command($name));
}