PhpBench\Console\Command\SelfUpdateCommand::execute PHP Метод

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

public execute ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output )
$input Symfony\Component\Console\Input\InputInterface
$output Symfony\Component\Console\Output\OutputInterface
    public function execute(InputInterface $input, OutputInterface $output)
    {
        // lazily instantiate the updater because otherwise it requires root
        // privleges when instantaited when the PHAR is in a non-writable
        // directory.
        if (!$this->updater) {
            $this->updater = new Updater();
            $this->updater->getStrategy()->setPharUrl(PhpBench::PHAR_URL);
            $this->updater->getStrategy()->setVersionUrl(PhpBench::PHAR_VERSION_URL);
        }
        if ($input->getOption('rollback')) {
            return $this->doRollback($output);
        } else {
            return $this->doUpdate($output);
        }
    }