Git Repository Public Repository

namibia

URLs

Copy to Clipboard
 
c449ac80b48405f72fd700d5cd406397b3a17d8a
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<?php
#-> Default Timezone.
date_default_timezone_set('Africa/Johannesburg');

#-> Entity Manager.
use Doctrine\ORM\Tools\Setup;
use Doctrine\ORM\EntityManager;
use Doctrine\ORM\Configuration;
use Doctrine\ORM\Mapping\Driver\AnnotationDriver;
use Doctrine\Common\Annotations\AnnotationReader;

//require_once "vendor/autoload.php";

$isDevMode = true;
$config = Setup::createAnnotationMetadataConfiguration(
    array(),
    $isDevMode
);
$baseDir = getcwd();
$driver = new AnnotationDriver(
    new Doctrine\Common\Annotations\AnnotationReader(),
    array(
        //"$baseDir/module/Application/src/Application/Entity",
        "$baseDir/module/Config/src/Config/Entity",
        "$baseDir/module/Utility/src/Utility/Entity",
        "$baseDir/module/Newsletter/src/Newsletter/Entity",
        "$baseDir/module/Auction/src/Auction/Entity",
        "$baseDir/module/Dispute/src/Dispute/Entity",
        "$baseDir/module/Company/src/Company/Entity",
        "$baseDir/module/User/src/User/Entity",
        "$baseDir/module/Stock/src/Stock/Entity",
        "$baseDir/module/Valuation/src/Valuation/Entity",
        "$baseDir/module/PriceGuide/src/PriceGuide/Entity",
        "$baseDir/module/Location/src/Location/Entity",
        "$baseDir/module/Person/src/Person/Entity",
        "$baseDir/module/Retail/src/Retail/Entity",
        "$baseDir/module/Adherence/src/Adherence/Entity",
        "$baseDir/module/Statistical/src/Statistical/Entity"
    )
);
$config->setMetadataDriverImpl($driver);
$conn = array(
    'driver'    => 'pdo_mysql',
    'host'      => '127.0.0.1',
    'user'      => 'root',
    'password'  => 'nrad',
    'dbname'    => 'nam_db'
);
$entityManager = EntityManager::create($conn, $config);

#-> Helper Set.
$helperSet = new \Symfony\Component\Console\Helper\HelperSet(array(
    'em' => new \Doctrine\ORM\Tools\Console\Helper\EntityManagerHelper($entityManager)
));
return $helperSet;

Commits for namibia/cli-config.php

Diff revisions: vs.
Revision Author Commited Message
bb2698 ... Diff Diff Mark Mon 24 Oct, 2016 08:44:08 +0000

latest update

df0489 ... Mark Fri 14 Oct, 2016 10:01:00 +0000

initial commit