AcmePhp\Cli\Command\SelfUpdateCommand::execute PHP Method

execute() protected method

protected 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
    protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->output = $output;
        $this->version = $this->getApplication()->getVersion();
        $parser = new VersionParser();
        /*
         * Check for ancilliary options
         */
        if ($input->getOption('rollback')) {
            $this->rollback();
            return;
        }
        if ($input->getOption('check')) {
            $this->printAvailableUpdates();
            return;
        }
        /*
         * Update to any specified stability option
         */
        if ($input->getOption('dev')) {
            $this->updateToDevelopmentBuild();
            return;
        }
        if ($input->getOption('pre')) {
            $this->updateToPreReleaseBuild();
            return;
        }
        if ($input->getOption('stable')) {
            $this->updateToStableBuild();
            return;
        }
        if ($input->getOption('non-dev')) {
            $this->updateToMostRecentNonDevRemote();
            return;
        }
        /*
         * If current build is stable, only update to more recent stable
         * versions if available. User may specify otherwise using options.
         */
        if ($parser->isStable($this->version)) {
            $this->updateToStableBuild();
            return;
        }
        /*
         * By default, update to most recent remote version regardless
         * of stability.
         */
        $this->updateToMostRecentNonDevRemote();
    }