Newscoop\Tools\Console\Command\UpdateAutoloadCommand::execute PHP Method

execute() protected method

See also: Console\Command\Command
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(Console\Input\InputInterface $input, Console\Output\OutputInterface $output)
    {
        exec('php composer.phar dump-autoload && echo "Found" || echo "Not Found"', $out);
        if ($out[0] == "Not Found") {
            exec('curl -s https://getcomposer.org/installer | php');
            exec('php composer.phar dump-autoload');
        }
        $output->writeln('Autoload dumped.');
    }
UpdateAutoloadCommand