Make developer commands runnable without install

This commit is contained in:
Romain Neutron
2013-07-16 19:36:18 +02:00
parent 2b6a284e9c
commit 303aadad57
14 changed files with 106 additions and 116 deletions

View File

@@ -57,14 +57,16 @@ try {
under certain conditions; type `about:license' for details.\n\n"
. ' Phraseanet Developer Tools ', Version::getName() . ' ' . Version::getNumber());
$helpers = array(
'db' => new ConnectionHelper($cli['EM']->getConnection()),
'em' => new EntityManagerHelper($cli['EM'])
);
if ($cli['phraseanet.configuration']->isSetup()) {
$helpers = array(
'db' => new ConnectionHelper($cli['EM']->getConnection()),
'em' => new EntityManagerHelper($cli['EM'])
);
$helperSet = $cli['console']->getHelperSet();
foreach ($helpers as $name => $helper) {
$helperSet->set($helper, $name);
$helperSet = $cli['console']->getHelperSet();
foreach ($helpers as $name => $helper) {
$helperSet->set($helper, $name);
}
}
$cli->command(new InstallAll());