/
cli-config.php
31 lines (26 loc) · 1.46 KB
/
cli-config.php
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
<?php
require __DIR__ . '/vendor/autoload.php';
//use Doctrine\ODM\MongoDB\Tools\Console\Helper\DocumentManagerHelper;
use Doctrine\ORM\Tools\Console\ConsoleRunner;
use Jgut\Slim\Doctrine\DocumentManagerBuilder;
use Jgut\Slim\Doctrine\EntityManagerBuilder;
$CLISettings = [
'cache_driver' => new \Doctrine\Common\Cache\VoidCache(),
];
$settings = require __DIR__ . '/src/settings.php';
$entityManager = EntityManagerBuilder::build(array_merge($settings['settings']['doctrine'], $CLISettings));
//$documentManager = DocumentManagerBuilder::build(array_merge($settings['document_manager'], $CLISettings));
return $helperSet = ConsoleRunner::createHelperSet($entityManager);
//$helperSet->set(new DocumentManagerHelper($documentManager), 'dm');
//
//$cli = ConsoleRunner::createApplication($helperSet, [
//new \Doctrine\ODM\MongoDB\Tools\Console\Command\GenerateDocumentsCommand(),
//new \Doctrine\ODM\MongoDB\Tools\Console\Command\GenerateHydratorsCommand(),
//new \Doctrine\ODM\MongoDB\Tools\Console\Command\GenerateProxiesCommand(),
//new \Doctrine\ODM\MongoDB\Tools\Console\Command\GenerateRepositoriesCommand(),
//new \Doctrine\ODM\MongoDB\Tools\Console\Command\QueryCommand(),
//new \Doctrine\ODM\MongoDB\Tools\Console\Command\ClearCache\MetadataCommand(),
//new \Doctrine\ODM\MongoDB\Tools\Console\Command\Schema\CreateCommand(),
//new \Doctrine\ODM\MongoDB\Tools\Console\Command\Schema\DropCommand(),
//new \Doctrine\ODM\MongoDB\Tools\Console\Command\Schema\UpdateCommand(),
//]);