/** * executa as fixtures * * @return */ public static function execute() { $objLoader = new \Doctrine\Common\DataFixtures\Loader(); $objLoader->loadFromDirectory(FixtureLoader::ds_path); $objORMExecutor = new \Doctrine\Common\DataFixtures\Executor\ORMExecutor(Bootstrap::getServiceManager()->get('Doctrine\\ORM\\EntityManager'), self::getORMPurger()); $objORMExecutor->execute($objLoader->getFixtures()); }
private function getListaDeProcessos() { return Bootstrap::getServiceManager()->get('Doctrine\\ORM\\EntityManager')->getRepository('Application\\Entity\\Processo')->createQueryBuilder('e')->select('e')->getQuery()->getResult(\Doctrine\ORM\Query::HYDRATE_ARRAY); }