1 | <?php |
||
7 | class View |
||
8 | { |
||
9 | /** |
||
10 | * Application Object |
||
11 | * |
||
12 | * @var \System\Application |
||
13 | */ |
||
14 | private $app; |
||
15 | |||
16 | /** |
||
17 | * Constructor |
||
18 | * |
||
19 | * @param \System\Application $app |
||
20 | */ |
||
21 | public function __construct(Application $app) |
||
25 | |||
26 | /** |
||
27 | * Render the given path with the passed |
||
28 | * variables and generate new view object for it |
||
29 | * |
||
30 | * @property object $url |
||
31 | * @property object $file |
||
32 | * @param string $path |
||
33 | * @param array $context |
||
34 | * @return string |
||
35 | */ |
||
36 | public function render(string $path, array $context) |
||
69 | |||
70 | /** |
||
71 | * Generate the path |
||
72 | * |
||
73 | * @param string $path |
||
74 | * @param string $dir |
||
75 | * @return string |
||
76 | */ |
||
77 | private function filePath($path, $dir) |
||
85 | |||
86 | /** |
||
87 | * Generate link to public |
||
88 | * |
||
89 | * @param string $dir |
||
90 | * @param array $host |
||
91 | * @return string |
||
92 | */ |
||
93 | private function _public($dir, $host) |
||
106 | |||
107 | /** |
||
108 | * Get the parameters from the url |
||
109 | * loop over all and give it the right link for each one |
||
110 | * e.g. if the current page is localhost/admin/users |
||
111 | * the right link for localhost is localhost or just / |
||
112 | * the right link for admin is localhost/admin |
||
113 | * the right link for users is localhost/admin/users |
||
114 | * |
||
115 | * @property object $url |
||
116 | * @return array |
||
117 | */ |
||
118 | private function parameters() |
||
145 | } |
||
146 |
Since your code implements the magic getter
_get
, this function will be called for any read access on an undefined variable. You can add the@property
annotation to your class or interface to document the existence of this variable.If the property has read access only, you can use the @property-read annotation instead.
Of course, you may also just have mistyped another name, in which case you should fix the error.
See also the PhpDoc documentation for @property.