-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.php
More file actions
27 lines (20 loc) · 806 Bytes
/
Copy pathindex.php
File metadata and controls
27 lines (20 loc) · 806 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
<?php
// Directory separator is set up here because separators are different on Linux and Windows operating systems
define('DS', DIRECTORY_SEPARATOR);
define('ROOT_DIR', dirname(__FILE__));
define('CONF_PATH', ROOT_DIR.'/config');
define('DEVELOPMENT_ENVIRONMENT', true);
// Import Bootstrap to load configuration and requirements
require_once ROOT_DIR.'/simplex/core/Bootstrap.php';
// Call Route class via namespace
use Core\Router;
// Define your app routes here
// Example:
// To show your example page from ExampleController with access link 'yourdomain/example'
Router::get('example', 'Controllers\ExampleController@displayExample');
// if no route found
Router::error('Core\Error@index');
// Turn on old style routing
Router::$fallback = false;
// execute matched routes
Router::dispatch();