public function run($input, array $options = [])
{
if (isset($options['interactive']) && $options['interactive']) {
$this->input = new InteractiveStringInput($input);
} else {
$this->input = new StringInput($input);
$this->input->setInteractive(false);
}
$this->output = new StreamOutput(fopen('php://memory', 'w', false), OutputInterface::VERBOSITY_DEBUG, false);
$this->output->setDecorated(false);
$inputStream = $this->getInputStream();
rewind($inputStream);
$this->setInputStream($inputStream);
$this->application->setAutoExit(false);
$this->disableStty();
$this->statusCode = $this->application->run($this->input, $this->output);
return $this->statusCode;
}