forked from 4nd/phpbelfast-framework
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathsetup.php
More file actions
32 lines (27 loc) · 791 Bytes
/
setup.php
File metadata and controls
32 lines (27 loc) · 791 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
<?php
require __DIR__ . '/vendor/autoload.php';
$app = new \Slim\Slim(array(
'view' => new \Slim\Views\Twig(),
'templates.path' => __DIR__ . '/views',
//'mode' => 'test'
));
$app->view()->parserOptions = array(
'debug' => true,
'cache' => __DIR__ . '/tmp/compiled'
);
$app->view()->parserExtensions = array(
new \Slim\Views\TwigExtension(),
);
require __DIR__ . '/config/database.php';
$app->container->set('postRepo', function(){
return new \PhpBelfast\Repos\PostRepo();
});
$app->container->set('eventRepo', function(){
return new \PhpBelfast\Repos\EventRepo();
});
$app->container->set('urlRepo', function(){
return new \PhpBelfast\Repos\UrlRepo();
});
$app->container->set('convert', function(){
return new \PhpBelfast\Utilities\Convert();
});