1 | <?php /** MicroController */ |
||
24 | abstract class Controller implements IController |
||
25 | { |
||
26 | /** @var Module $module */ |
||
27 | public $module; |
||
28 | /** @var IResponse $response Response HTTP data */ |
||
29 | public $response; |
||
30 | /** @var IContainer $container */ |
||
31 | protected $container; |
||
32 | |||
33 | /** |
||
34 | * Constructor controller |
||
35 | * |
||
36 | * @access public |
||
37 | * |
||
38 | * @param IContainer $container |
||
39 | * @param string $modules |
||
40 | * |
||
41 | * @result void |
||
42 | */ |
||
43 | public function __construct(IContainer $container, $modules = '') |
||
64 | |||
65 | /** |
||
66 | * Apply filters |
||
67 | * |
||
68 | * @access public |
||
69 | * |
||
70 | * @param string $action current action name |
||
71 | * @param bool $isPre is pre or post |
||
72 | * @param array $filters defined filters |
||
73 | * @param string $data data to parse |
||
74 | * |
||
75 | * @return null|string |
||
76 | * @throws Exception |
||
77 | */ |
||
78 | public function applyFilters($action, $isPre = true, array $filters = [], $data = null) |
||
110 | |||
111 | /** |
||
112 | * Get action class by name |
||
113 | * |
||
114 | * @access public |
||
115 | * |
||
116 | * @param string $name action name |
||
117 | * |
||
118 | * @return bool |
||
119 | */ |
||
120 | public function getActionClassByName($name) |
||
136 | } |
||
137 |
If you access a property on an interface, you most likely code against a concrete implementation of the interface.
Available Fixes
Adding an additional type check:
Changing the type hint: