1 | <?php |
||
12 | class App |
||
13 | { |
||
14 | /** |
||
15 | * Events |
||
16 | */ |
||
17 | private static $events; |
||
18 | |||
19 | /** |
||
20 | * Return value from application |
||
21 | * |
||
22 | * @var string |
||
23 | */ |
||
24 | private $output = false; |
||
25 | |||
26 | /** |
||
27 | * Namespaced controller path |
||
28 | * |
||
29 | * @var string |
||
30 | */ |
||
31 | private $class; |
||
32 | |||
33 | /** |
||
34 | * Instantiated class object |
||
35 | * |
||
36 | * @var Controller |
||
37 | */ |
||
38 | private $instantiatedClass; |
||
39 | |||
40 | /** |
||
41 | * Module being accessed |
||
42 | * |
||
43 | * @var string |
||
44 | */ |
||
45 | private $module; |
||
46 | |||
47 | /** |
||
48 | * Controller being accessed |
||
49 | * |
||
50 | * @var string |
||
51 | */ |
||
52 | private $controller; |
||
53 | |||
54 | /** |
||
55 | * Method being accessed |
||
56 | * |
||
57 | * @var string |
||
58 | */ |
||
59 | private $method; |
||
60 | |||
61 | /** |
||
62 | * Params being passed |
||
63 | * |
||
64 | * @var array |
||
65 | */ |
||
66 | private $params; |
||
67 | |||
68 | /** |
||
69 | * @var DIContainer $container |
||
70 | */ |
||
71 | private $container; |
||
72 | |||
73 | /** |
||
74 | * Application bootstrap process |
||
75 | * |
||
76 | * The application registers the configuration in the app/config/core.php |
||
77 | * and then processes, and makes available the configured resources |
||
78 | * |
||
79 | * App constructor. |
||
80 | // * @param Config $config |
||
|
|||
81 | * @param DIContainer $container |
||
82 | */ |
||
83 | 28 | public function __construct(DIContainer $container) |
|
94 | |||
95 | /** |
||
96 | * Calls the proper shell for app execution |
||
97 | * |
||
98 | * @access private |
||
99 | */ |
||
100 | public function initialize() |
||
105 | |||
106 | /** |
||
107 | * App preparation cycle |
||
108 | */ |
||
109 | 18 | private function prepare() |
|
119 | |||
120 | // public function setContainer(Container $container) |
||
121 | // { |
||
122 | // $this->container = $container; |
||
123 | // } |
||
124 | |||
125 | /** |
||
126 | * Verifies the provided application request is a valid request |
||
127 | * |
||
128 | * @access private |
||
129 | */ |
||
130 | private function validateRequest() |
||
144 | |||
145 | /** |
||
146 | * Processes the application request |
||
147 | * |
||
148 | * @access private |
||
149 | */ |
||
150 | private function start() |
||
171 | |||
172 | /** |
||
173 | * Attach (or remove) multiple callbacks to an event and trigger those callbacks when that event is called. |
||
174 | * |
||
175 | * @param string $event name |
||
176 | * @param mixed $value the optional value to pass to each callback |
||
177 | * @param mixed $callback the method or function to call - FALSE to remove all callbacks for event |
||
178 | */ |
||
179 | |||
180 | public static function addEvent($event, $callback = false) |
||
189 | |||
190 | public function callEvent($event, $method = false, $arguments = []) |
||
212 | |||
213 | |||
214 | /** |
||
215 | * Prepare application return value into a string |
||
216 | * |
||
217 | * @access public |
||
218 | * @return string |
||
219 | */ |
||
220 | public function __toString() |
||
230 | } |
||
231 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.