Peridot\Console\ConfigurationReader::readInput PHP Method

readInput() public static method

Static access to reader
public static readInput ( Symfony\Component\Console\Input\InputInterface $input ) : Configuration
$input Symfony\Component\Console\Input\InputInterface
return Peridot\Configuration
    public static function readInput(InputInterface $input)
    {
        $reader = new static($input);
        return $reader->read();
    }

Usage Example

Beispiel #1
0
 /**
  * Run the Peridot application
  *
  * @param InputInterface $input
  * @param OutputInterface $output
  * @return int
  */
 public function doRun(InputInterface $input, OutputInterface $output)
 {
     $this->configuration = ConfigurationReader::readInput($input);
     $this->environment->getEventEmitter()->emit('peridot.configure', [$this->configuration, $this]);
     $runner = $this->getRunner();
     $factory = new ReporterFactory($this->configuration, $output, $this->environment->getEventEmitter());
     $this->loadDsl($this->configuration->getDsl());
     $this->add(new Command($runner, $this->configuration, $factory, $this->environment->getEventEmitter()));
     $exitCode = parent::doRun($input, $output);
     $this->environment->getEventEmitter()->emit('peridot.end', [$exitCode, $input, $output]);
     return $exitCode;
 }
All Usage Examples Of Peridot\Console\ConfigurationReader::readInput