-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex2.php
46 lines (32 loc) · 965 Bytes
/
index2.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
<?php
define("ENVIRONMENT", "development");
define("ROOT", __DIR__);
/* Load the configuration bootstrap file */
require_once("config/config.php");
/*Autoload the system classes */
require_once("../reunion/vendor/autoload.php");
//$dispatcher = new Dispatcher();
//$dispatcher->handleEvent();
$app = new Silex\Application();
// define controllers for a blog
$blog = $app['controllers_factory'];
$blog->get('/', function () {
return 'Blog home page';
});
// ...
// define controllers for a forum
$forum = $app['controllers_factory'];
$forum->get('/', function () {
return 'Forum home page';
});
// define "global" controllers
$app->get('/', function () {
return 'Main home page';
});
$app->mount('/blog', $blog);
$app->mount('/forum', $forum);
$app->run();
exit;
$app = new App();
$app->run($config);
?>