| Total Complexity | 2 |
| Total Lines | 19 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 4 | trait ControllerTrait |
||
| 5 | { |
||
| 6 | abstract protected function config(); |
||
| 7 | abstract protected function request(); |
||
| 8 | abstract protected function setData($key, $value); |
||
| 9 | |||
| 10 | protected function setupPaths() |
||
| 11 | { |
||
| 12 | $this->setData('path', $this->config()->get('app/path')); |
||
| 13 | $this->setData('url/app', $this->request()->getAppUrl()); |
||
| 14 | $this->setData('url/lang', $this->request()->getUrl(['lang'])); |
||
| 15 | $this->setData('url/current', $this->request()->getUrl()); |
||
| 16 | } |
||
| 17 | |||
| 18 | /** |
||
| 19 | * Called (optionally) by each method. |
||
| 20 | */ |
||
| 21 | protected function init() |
||
| 23 | } |
||
| 24 | } |
||
| 25 |