protected function execute(InputInterface $input, OutputInterface $output) { $em = Application::getEntityManager(); $website = $input->getArgument('website'); if ($website == 'ALL') { $finders = $this->app->getProjectFinders(); } else { $finders = [$this->getApplication()->find($website . ':find')]; } foreach ($finders as $FinderCommand) { $this->ImportProjects($FinderCommand, $em, $output); } try { $em->flush(); } catch (PDOException $exception) { throw $exception; } $output->writeln("Done."); }
<?php /** * Project: FreelancerBidder * Required for doctrine database schema modifications. * * @author Amado Martinez <*****@*****.**> */ require __DIR__ . '/../vendor/autoload.php'; return Doctrine\ORM\Tools\Console\ConsoleRunner::createHelperSet(\Projectivemotion\FreelancerBidder\Application::getEntityManager());