You are here

public function Shell::__construct in Zircon Profile 8

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

Constructor.

If there is no readline support for the current PHP executable a \RuntimeException exception is thrown.

Parameters

Application $application An application instance:

File

vendor/symfony/console/Shell.php, line 44

Class

Shell
A Shell wraps an Application to add shell capabilities to it.

Namespace

Symfony\Component\Console

Code

public function __construct(Application $application) {
  $this->hasReadline = function_exists('readline');
  $this->application = $application;
  $this->history = getenv('HOME') . '/.history_' . $application
    ->getName();
  $this->output = new ConsoleOutput();
}