1 | <?php |
||
2 | /** |
||
3 | * This file is part of the O2System PHP Framework package. |
||
4 | * |
||
5 | * For the full copyright and license information, please view the LICENSE |
||
6 | * file that was distributed with this source code. |
||
7 | * |
||
8 | * @author Steeve Andrian Salim |
||
9 | * @copyright Copyright (c) Steeve Andrian Salim |
||
10 | */ |
||
11 | |||
12 | // ------------------------------------------------------------------------ |
||
13 | |||
14 | namespace O2System\Reactor\Http; |
||
15 | |||
16 | // ------------------------------------------------------------------------ |
||
17 | |||
18 | /** |
||
19 | * Class Controller |
||
20 | * |
||
21 | * @package O2System\Framework\Http |
||
22 | */ |
||
23 | class Controller extends \O2System\Kernel\Http\Controller |
||
24 | { |
||
25 | public function &__get($property) |
||
26 | { |
||
27 | $get[ $property ] = false; |
||
0 ignored issues
–
show
Comprehensibility
Best Practice
introduced
by
![]() |
|||
28 | |||
29 | // CodeIgniter property aliasing |
||
30 | if ($property === 'load') { |
||
31 | $property = 'loader'; |
||
32 | } |
||
33 | |||
34 | if (services()->has($property)) { |
||
35 | $get[ $property ] = services()->get($property); |
||
36 | } elseif (o2system()->__isset($property)) { |
||
37 | $get[ $property ] = o2system()->__get($property); |
||
38 | } elseif ($property === 'model') { |
||
39 | $get[ $property ] = models('controller'); |
||
40 | } elseif ($property === 'services' || $property === 'libraries') { |
||
41 | $get[ $property ] = services(); |
||
42 | } |
||
43 | |||
44 | return $get[ $property ]; |
||
45 | } |
||
46 | } |