Conditions | 2 |
Paths | 2 |
Total Lines | 18 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
25 | public function index() |
||
26 | { |
||
27 | // Route |
||
28 | if ($this->request->get['route'] != 'startup/router') { |
||
29 | $route = $this->request->get['route']; |
||
30 | } |
||
31 | |||
32 | $data = array(); |
||
33 | |||
34 | // Sanitize the call |
||
35 | $route = preg_replace('/[^a-zA-Z0-9_\/]/', '', (string)$route); |
||
36 | |||
37 | $action = new \Divine\Engine\Core\Action($route); |
||
38 | |||
39 | // Any output needs to be another Action object. |
||
40 | $output = $action->execute($this->registry, $data); |
||
41 | |||
42 | return $output; |
||
43 | } |
||
45 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.