public function execute(InputInterface $input, OutputInterface $output)
{
if (!$this->hasConfig($input) && !$this->hasPath($input)) {
$this->displayHelp($input, $output);
}
if ($input->getOption('runner') === 'WrapperRunner') {
$runner = new WrapperRunner($this->getRunnerOptions($input));
} else {
if ($input->getOption('runner') !== '') {
// because we want to have to bootstrap script inherited before check/initialization
$runnerOption = $this->getRunnerOptions($input);
$runnerClass = $input->getOption('runner');
if (class_exists($runnerClass)) {
$runner = new $runnerClass($runnerOption);
}
}
}
if (!isset($runner)) {
$runner = new Runner($this->getRunnerOptions($input));
}
$runner->run();
return $runner->getExitCode();
}