-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbootstrap.php
47 lines (38 loc) · 1.21 KB
/
bootstrap.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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?php
require_once __DIR__.'/vendor/autoload.php';
$app = new Silex\Application();
$app['debug'] = true;
// Doctrine DBAL Service provider
$app->register(new Silex\Provider\DoctrineServiceProvider(), array(
'db.options' => array(
'driver' => 'pdo_sqlite',
'path' => __DIR__.'/data/app.db',
),
));
// Doctrine ORM Service provider
$app->register(new Dflydev\Silex\Provider\DoctrineOrm\DoctrineOrmServiceProvider(), array(
"orm.proxies_dir" => __DIR__.'/cache/proxies',
"orm.em.options" => array(
"mappings" => array(
array(
"type" => "annotation",
"namespace" => "WHL\Model",
"path" => __DIR__."/src/WHL/Model",
),
),
),
));
// The Session service
$app->register(new Silex\Provider\SessionServiceProvider());
// The Logging Service
$app->register(new Silex\Provider\MonologServiceProvider(), array(
'monolog.logfile' => __DIR__.'/logs/silex.log',
));
// The URL Generator Service
$app->register(new Silex\Provider\UrlGeneratorServiceProvider());
// The Twig service
$app->register(new Silex\Provider\TwigServiceProvider(), array(
'twig.path' => __DIR__.'/views'
)
);
return $app;