-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
48 lines (32 loc) · 1.09 KB
/
index.php
File metadata and controls
48 lines (32 loc) · 1.09 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
<?php
/**
* Brewery
*
* Brewery is an object oriented, agile and scalable RESTful web applications framework built for PHP 5.4 and later, which focuses on structured and enterprise-worthy application development for cloud based services and applications.
*
* @link http://brewphp.org
*
* @author Robin Grass <hej@carbin.se>
*
* @license http://opensource.org/licenses/MIT MIT
*/
/**
* @const string BREWERY_ROOT_PATH Brewery root path.
*/
define('BREWERY_ROOT_PATH', dirname(__FILE__) . DIRECTORY_SEPARATOR);
try {
// Require Brewery bootstrap
require_once implode(DIRECTORY_SEPARATOR, [rtrim(BREWERY_ROOT_PATH, DIRECTORY_SEPARATOR), 'libs', 'vendor', 'Brewery', 'Bootstrap.php']);
// Load environment configuration
\Brewery\environment('config');
$brewery = \Brewery::getInstance();
$router = new \Brewery\Routing\Router();
$output = $router->delegate();
$brewery->httpClient->sendHeaders();
echo $output;
} catch (\Brewery\Exceptions\ExceptionAbstract $exception) {
$brewery = \Brewery::getInstance();
$brewery->httpClient->sendHeaders();
\Brewery\dump($exception);
}
?>