@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | $arrInput = explode('/', $controller_action); |
59 | 59 | $controller = ucfirst(strtolower($arrInput[0])); |
60 | 60 | $action = ucfirst(strtolower($arrInput[1])); |
61 | - if($action == null) { |
|
61 | + if ($action == null) { |
|
62 | 62 | $action = 'Index'; |
63 | 63 | } |
64 | 64 | // set action and id |
@@ -70,13 +70,13 @@ discard block |
||
70 | 70 | |
71 | 71 | try { |
72 | 72 | $controller_path = '/Apps/Controller/' . env_name . '/' . $controller . '.php'; |
73 | - if(file_exists(root . $controller_path) && is_readable(root . $controller_path)) { |
|
73 | + if (file_exists(root . $controller_path) && is_readable(root . $controller_path)) { |
|
74 | 74 | include_once(root . $controller_path); |
75 | 75 | $cname = 'Apps\\Controller\\' . env_name . '\\' . $controller; |
76 | - if(class_exists($cname)) { |
|
76 | + if (class_exists($cname)) { |
|
77 | 77 | $load = new $cname; |
78 | - if(method_exists($cname, $action)) { |
|
79 | - if($id !== null) { |
|
78 | + if (method_exists($cname, $action)) { |
|
79 | + if ($id !== null) { |
|
80 | 80 | $output = @$load->$action($id); |
81 | 81 | } else { |
82 | 82 | $output = @$load->$action(); |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | } else { |
92 | 92 | throw new NativeException('Controller not founded: {root}' . $controller_path); |
93 | 93 | } |
94 | - } catch(NativeException $e) { |
|
94 | + } catch (NativeException $e) { |
|
95 | 95 | $e->display($e->getMessage()); |
96 | 96 | } |
97 | 97 | } |