Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
52 lines (37 loc) · 1.43 KB

File metadata and controls

52 lines (37 loc) · 1.43 KB
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
<?php
/**
* Created by PhpStorm.
* User: shiblie
* Date: 5/30/17
* Time: 7:11 PM
*/
use Slim\App as Slim;
use Respect\Validation\Validator as v;
session_cache_limiter(false);
session_start();
// defining DIRECTORY SEPARATOR
defined('DS') ? null : define('DS', DIRECTORY_SEPARATOR);
// defining the application running mode (development or production)
defined('APPMODE') ? null : define('APPMODE', 'development.php');
//define Application root path
defined('ROOTPATH') ? null : define('ROOTPATH', dirname(__DIR__));
// define views path
defined('VIEWSPATH') ? null : define('VIEWSPATH', ROOTPATH . DS . 'resources' . DS . 'views' . DS);
// Autoload the composer libraries
require ROOTPATH . DS . 'vendor' . DS . 'autoload.php';
// pull in the configurations file
// TODO move configurations to DB
$settings = require (ROOTPATH . DS . 'app' . DS . 'Config' . DS . APPMODE);
$app = new Slim($settings);
require ROOTPATH . DS . 'bootstrap' . DS . 'container.php';
$app->add(new App\Middleware\ValidationErrorsMiddleware($container));
$app->add(new \App\Middleware\OldInputMiddleware($container));
$app->add(new \App\Middleware\CsrfViewMiddleware($container));
$app->add($container->csrf);
$app->add(new \Slim\HttpCache\Cache(
$container->config->get('view.cacheavail'),
$container->config->get('view.cachetime')
));
// validation rules
v::with('App\\Validation\\Rules\\');
require ROOTPATH . DS . 'app' . DS . 'Routes' . DS . 'web.php';
Morty Proxy This is a proxified and sanitized view of the page, visit original site.