Symfony\Component\Console\Application::__construct PHP Метод

__construct() публичный Метод

public __construct ( string $name = 'UNKNOWN', string $version = 'UNKNOWN' )
$name string The name of the application
$version string The version of the application
    public function __construct($name = 'UNKNOWN', $version = 'UNKNOWN')
    {
        $this->name = $name;
        $this->version = $version;
        $this->terminal = new Terminal();
        $this->defaultCommand = 'list';
        $this->helperSet = $this->getDefaultHelperSet();
        $this->definition = $this->getDefaultInputDefinition();
        foreach ($this->getDefaultCommands() as $command) {
            $this->add($command);
        }
    }

Usage Example

Пример #1
0
 /**
  * {@inheritdoc}
  */
 public function __construct()
 {
     parent::__construct('Symplify Coding Standard', null);
     $runnerCollection = $this->createAndFillRunnerCollection();
     $this->add(new CheckCommand($runnerCollection));
     $this->add(new FixCommand($runnerCollection));
 }
All Usage Examples Of Symfony\Component\Console\Application::__construct