1 | <?php |
||
5 | class CtrlRouterLink extends AbstractSystem |
||
6 | { |
||
7 | /** |
||
8 | * @var \stdClass|null $ctrlRouterInfos Infos from router for controller |
||
9 | * system |
||
10 | */ |
||
11 | protected $ctrlRouterInfos; |
||
12 | |||
13 | /** |
||
14 | * {@inheritdoc} |
||
15 | * |
||
16 | * @return \stdClass|null |
||
17 | */ |
||
18 | public function __invoke() |
||
22 | |||
23 | /** |
||
24 | * Getter accessor for property ctrlRouterInfos |
||
25 | * |
||
26 | * @return \stdClass|null |
||
27 | */ |
||
28 | public function getCtrlRouterInfos() |
||
32 | |||
33 | /** |
||
34 | * {@inheritdoc} |
||
35 | * Initialize the ctrlRouterInfos property |
||
36 | * Create the new runTasks ctrlRouterLink, add him to subjectList and send |
||
37 | * the notify to inform the adding. |
||
38 | */ |
||
39 | public function init() |
||
62 | |||
63 | /** |
||
64 | * List all tasks runned by ctrlRouterLink |
||
65 | * |
||
66 | * @return array |
||
67 | */ |
||
68 | protected function obtainCtrlRouterLinkTasks() |
||
86 | |||
87 | /** |
||
88 | * {@inheritdoc} |
||
89 | */ |
||
90 | public function toRun() |
||
94 | |||
95 | /** |
||
96 | * {@inheritdoc} |
||
97 | * Execute the ctrlRouter tasks |
||
98 | */ |
||
99 | public function run() |
||
104 | |||
105 | /** |
||
106 | * Execute the ctrlRouter task to find the route and the controller. |
||
107 | * If nothing is found (context object), return an 404 error. |
||
108 | * Not executed in cli. |
||
109 | * |
||
110 | * @return void |
||
111 | */ |
||
112 | protected function runCtrlRouterLink() |
||
123 | } |
||
124 |
If you implement
__call
and you know which methods are available, you can improve IDE auto-completion and static analysis by adding a @method annotation to the class.This is often the case, when
__call
is implemented by a parent class and only the child class knows which methods exist: