@@ -12,19 +12,19 @@ |
||
12 | 12 | class Api extends \erdiko\Controller |
13 | 13 | { |
14 | 14 | |
15 | - /** |
|
16 | - * Contructor |
|
17 | - */ |
|
15 | + /** |
|
16 | + * Contructor |
|
17 | + */ |
|
18 | 18 | public function __construct() |
19 | 19 | { |
20 | 20 | $this->_webroot = ERDIKO_ROOT; |
21 | 21 | $this->_response = new \erdiko\core\ApiResponse; |
22 | 22 | } |
23 | 23 | |
24 | - /** |
|
25 | - * setStatusCode |
|
26 | - * |
|
27 | - */ |
|
24 | + /** |
|
25 | + * setStatusCode |
|
26 | + * |
|
27 | + */ |
|
28 | 28 | public function setStatusCode($code = null) |
29 | 29 | { |
30 | 30 | if (!empty($code)) { |
@@ -13,9 +13,9 @@ |
||
13 | 13 | class Ajax extends \erdiko\Controller |
14 | 14 | { |
15 | 15 | |
16 | - /** |
|
17 | - * Contructor |
|
18 | - */ |
|
16 | + /** |
|
17 | + * Contructor |
|
18 | + */ |
|
19 | 19 | public function __construct() |
20 | 20 | { |
21 | 21 | $this->_webroot = ERDIKO_ROOT; |
@@ -6,9 +6,9 @@ |
||
6 | 6 | * @copyright 2012-2017 Arroyo Labs, Inc. http://www.arroyolabs.com |
7 | 7 | * @author John Arroyo <[email protected]> |
8 | 8 | */ |
9 | -ini_set('include_path', ini_get('include_path') . PATH_SEPARATOR . ERDIKO_ROOT . PATH_SEPARATOR . ERDIKO_ROOT . '/app'); |
|
9 | +ini_set('include_path', ini_get('include_path').PATH_SEPARATOR.ERDIKO_ROOT.PATH_SEPARATOR.ERDIKO_ROOT.'/app'); |
|
10 | 10 | |
11 | -spl_autoload_register(function ($name) { |
|
11 | +spl_autoload_register(function($name) { |
|
12 | 12 | |
13 | 13 | // error_log("autoload: $name"); |
14 | 14 |
@@ -1,9 +1,9 @@ |
||
1 | 1 | <?php |
2 | 2 | // @note should we fully deprecate the globals? |
3 | - define('ERDIKO_ROOT', getenv('ERDIKO_ROOT')); |
|
4 | - define('ERDIKO_PUBLIC', ERDIKO_ROOT.'/public'); |
|
5 | - define('ERDIKO_APP', ERDIKO_ROOT.'/app'); |
|
6 | - define('ERDIKO_VAR', ERDIKO_ROOT.'/var'); |
|
3 | + define('ERDIKO_ROOT', getenv('ERDIKO_ROOT')); |
|
4 | + define('ERDIKO_PUBLIC', ERDIKO_ROOT.'/public'); |
|
5 | + define('ERDIKO_APP', ERDIKO_ROOT.'/app'); |
|
6 | + define('ERDIKO_VAR', ERDIKO_ROOT.'/var'); |
|
7 | 7 | |
8 | 8 | // @todo move this function |
9 | 9 | if (PHP_SAPI == 'cli-server') { |
@@ -17,8 +17,8 @@ |
||
17 | 17 | } |
18 | 18 | |
19 | 19 | require_once 'src/autoload.php'; |
20 | -require_once getenv('ERDIKO_ROOT') . '/vendor/autoload.php'; |
|
20 | +require_once getenv('ERDIKO_ROOT').'/vendor/autoload.php'; |
|
21 | 21 | |
22 | 22 | // Set a default context if none specified |
23 | -if(empty(getenv('ERDIKO_CONTEXT'))) |
|
23 | +if (empty(getenv('ERDIKO_CONTEXT'))) |
|
24 | 24 | putenv("ERDIKO_CONTEXT=default"); |
@@ -20,5 +20,6 @@ |
||
20 | 20 | require_once getenv('ERDIKO_ROOT') . '/vendor/autoload.php'; |
21 | 21 | |
22 | 22 | // Set a default context if none specified |
23 | -if(empty(getenv('ERDIKO_CONTEXT'))) |
|
23 | +if(empty(getenv('ERDIKO_CONTEXT'))) { |
|
24 | 24 | putenv("ERDIKO_CONTEXT=default"); |
25 | +} |
@@ -23,7 +23,7 @@ |
||
23 | 23 | */ |
24 | 24 | public function __construct($container = null) |
25 | 25 | { |
26 | - if($container === null) { |
|
26 | + if ($container === null) { |
|
27 | 27 | $container = require getenv("ERDIKO_ROOT")."/bootstrap/settings.php"; |
28 | 28 | } |
29 | 29 | parent::__construct($container); |