added database connection to cli helper to be able to query dirctly with sql

This commit is contained in:
Steffen Vogel 2010-07-25 23:16:43 +02:00
parent aa2c706517
commit d997ca4ad4

View file

@ -47,7 +47,10 @@ Util\Configuration::load(BACKEND_DIR . '/volkszaehler.conf');
$em = Volkszaehler\Dispatcher::createEntityManager();
$helperSet = new \Symfony\Components\Console\Helper\HelperSet(array('em' => new \Doctrine\ORM\Tools\Console\Helper\EntityManagerHelper($em)));
$helperSet = new \Symfony\Components\Console\Helper\HelperSet(array(
'db' => new \Doctrine\DBAL\Tools\Console\Helper\ConnectionHelper($em->getConnection()),
'em' => new \Doctrine\ORM\Tools\Console\Helper\EntityManagerHelper($em)
));
$cli = new \Symfony\Components\Console\Application('Doctrine Command Line Interface', Doctrine\ORM\Version::VERSION);
$cli->setCatchExceptions(TRUE);