-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpartkeepr.php
More file actions
35 lines (24 loc) · 844 Bytes
/
partkeepr.php
File metadata and controls
35 lines (24 loc) · 844 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
namespace PartKeepr\Console;
use PartKeepr\PartKeepr;
include("src/backend/PartKeepr/PartKeepr.php");
PartKeepr::initializeClassLoaders();
PartKeepr::initializeConfig();
$cli = new \Symfony\Component\Console\Application('PartKeepr Console', \PartKeepr\PartKeeprVersion::PARTKEEPR_VERSION);
$cli->setCatchExceptions(true);
try {
PartKeepr::initializeDoctrine();
$helperSet = $cli->getHelperSet();
$helpers = array(
'db' => new \Doctrine\DBAL\Tools\Console\Helper\ConnectionHelper(PartKeepr::getEM()->getConnection()),
'em' => new \Doctrine\ORM\Tools\Console\Helper\EntityManagerHelper(PartKeepr::getEM())
);
foreach ($helpers as $name => $helper) {
$helperSet->set($helper, $name);
}
} catch (\Exception $e) {
}
$cli->addCommands(array(
new \PartKeepr\Console\Commands\MinifyJSCommand()
));
$cli->run();