-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
66 lines (54 loc) · 1.59 KB
/
index.php
File metadata and controls
66 lines (54 loc) · 1.59 KB
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
56
57
58
59
60
61
62
63
64
65
66
<?php
/**
* Application entry point.
* @package System
*/
//Include the configuration file
require_once("config.php");
require_once("errors.php");
//Include the Router class
require_once(LIB_ROUTE."Router.php");
//Create a Router instance
$objRouteMan = new Router();
//Configuration of routes allowed in the application
$objRouteMan->addRoute(',modeling_structure', [
'file' => 'modeling_structure.php',
'layout' => 'developer.php'
]);
$objRouteMan->addRoute('structure_check_file', [
'file' => 'structure_check_file.php',
'layout' => 'json.php',
'content' => 'application/json'
]);
$objRouteMan->addRoute('structure_read_file', [
'file' => 'structure_read_file.php',
'layout' => 'json.php',
'content' => 'application/json'
]);
$objRouteMan->addRoute('structure_save_file', [
'file' => 'structure_save_file.php',
'layout' => 'json.php',
'content' => 'application/json'
]);
$objRouteMan->addRoute('structure_create_folder', [
'file' => 'structure_create_folder.php',
'layout' => 'json.php',
'content' => 'application/json'
]);
$objRouteMan->addRoute('run_simulation_stream', [
'file' => 'run_simulation_stream.php',
'layout' => 'json.php',
'content' => 'text/event-stream'
]);
$objRouteMan->addRoute('help_about_modeling', [
'file' => 'help_about_modeling.php',
'layout' => 'json.php',
'content' => 'application/json'
]);
$objRouteMan->addRoute('help_about_simulation', [
'file' => 'help_about_simulation.php',
'layout' => 'json.php',
'content' => 'application/json'
]);
//Manage the routes.
$objRouteMan->manageRoutes();