@@ -206,7 +206,7 @@ discard block |
||
206 | 206 | * @param string $name |
207 | 207 | * @param string $cssFile URL of injected css file |
208 | 208 | * @param int $order |
209 | - * @param boolean $active defaults to 1 |
|
209 | + * @param integer $active defaults to 1 |
|
210 | 210 | * @todo need to resolve order of merging and/or eliminate/refactor this function |
211 | 211 | */ |
212 | 212 | public function addCss($name, $cssFile, $order = 10, $active = 1) |
@@ -239,7 +239,7 @@ discard block |
||
239 | 239 | * @param string $name |
240 | 240 | * @param string $jsFile URL of js file |
241 | 241 | * @param int $order |
242 | - * @param boolean $active defaults to 1 |
|
242 | + * @param integer $active defaults to 1 |
|
243 | 243 | * @todo same issue as addCss |
244 | 244 | */ |
245 | 245 | public function addJs($name, $jsFile, $order = 10, $active = 1) |
@@ -254,7 +254,6 @@ discard block |
||
254 | 254 | /** |
255 | 255 | * Get Theme Root Folder |
256 | 256 | * |
257 | - * @param string $folder |
|
258 | 257 | */ |
259 | 258 | public function getThemeRootFolder() |
260 | 259 | { |
@@ -316,6 +315,7 @@ discard block |
||
316 | 315 | * Set the theme name, the name is also the id of the theme |
317 | 316 | * |
318 | 317 | * @param string Theme name |
318 | + * @param string $name |
|
319 | 319 | */ |
320 | 320 | public function setName($name) |
321 | 321 | { |
@@ -40,7 +40,7 @@ |
||
40 | 40 | // Action |
41 | 41 | $action .= empty($args['action']) ? "" : ucfirst($args['action']); |
42 | 42 | |
43 | - // @todo trigger 404 instead of throw exception |
|
43 | + // @todo trigger 404 instead of throw exception |
|
44 | 44 | if(!method_exists($this, $action)) |
45 | 45 | throw new \Exception("action does not exist"); |
46 | 46 |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | $action .= empty($args['action']) ? "" : ucfirst($args['action']); |
42 | 42 | |
43 | 43 | // @todo trigger 404 instead of throw exception |
44 | - if(!method_exists($this, $action)) |
|
44 | + if (!method_exists($this, $action)) |
|
45 | 45 | throw new \Exception("action does not exist"); |
46 | 46 | |
47 | 47 | return $action; |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | */ |
54 | 54 | public function render($response, $view, $application) |
55 | 55 | { |
56 | - if(empty($view)) |
|
56 | + if (empty($view)) |
|
57 | 57 | $view = $application['theme']['defaults']['view']; |
58 | 58 | |
59 | 59 | return $this->container->theme->render($response, $view, $application); |
@@ -41,8 +41,9 @@ discard block |
||
41 | 41 | $action .= empty($args['action']) ? "" : ucfirst($args['action']); |
42 | 42 | |
43 | 43 | // @todo trigger 404 instead of throw exception |
44 | - if(!method_exists($this, $action)) |
|
45 | - throw new \Exception("action does not exist"); |
|
44 | + if(!method_exists($this, $action)) { |
|
45 | + throw new \Exception("action does not exist"); |
|
46 | + } |
|
46 | 47 | |
47 | 48 | return $action; |
48 | 49 | } |
@@ -53,8 +54,9 @@ discard block |
||
53 | 54 | */ |
54 | 55 | public function render($response, $view, $application) |
55 | 56 | { |
56 | - if(empty($view)) |
|
57 | - $view = $application['theme']['defaults']['view']; |
|
57 | + if(empty($view)) { |
|
58 | + $view = $application['theme']['defaults']['view']; |
|
59 | + } |
|
58 | 60 | |
59 | 61 | return $this->container->theme->render($response, $view, $application); |
60 | 62 | } |
@@ -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 |