You are here

public function Command::setApplication in Zircon Profile 8

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

Sets the application instance for this command.

Parameters

Application $application An Application instance:

File

vendor/symfony/console/Command/Command.php, line 84

Class

Command
Base class for all commands.

Namespace

Symfony\Component\Console\Command

Code

public function setApplication(Application $application = null) {
  $this->application = $application;
  if ($application) {
    $this
      ->setHelperSet($application
      ->getHelperSet());
  }
  else {
    $this->helperSet = null;
  }
}