1 | <?php |
||
20 | class HookHelper extends Base |
||
21 | { |
||
22 | /** |
||
23 | * Add assets JS or CSS. |
||
24 | * |
||
25 | * @param string $type |
||
26 | * @param string $hook |
||
27 | * |
||
28 | * @return string |
||
29 | */ |
||
30 | public function asset($type, $hook) |
||
40 | |||
41 | /** |
||
42 | * Render all attached hooks. |
||
43 | * |
||
44 | * @param string $hook |
||
45 | * @param array $variables |
||
46 | * |
||
47 | * @return string |
||
48 | */ |
||
49 | public function render($hook, array $variables = []) |
||
69 | |||
70 | /** |
||
71 | * Attach a template to a hook. |
||
72 | * |
||
73 | * @param string $hook |
||
74 | * @param string $template |
||
75 | * @param array $variables |
||
76 | * |
||
77 | * @return $this |
||
78 | */ |
||
79 | public function attach($hook, $template, array $variables = []) |
||
88 | |||
89 | /** |
||
90 | * Attach a template to a hook with a callable. |
||
91 | * |
||
92 | * Arguments passed to the callback are the one passed to the hook |
||
93 | * |
||
94 | * @param string $hook |
||
95 | * @param string $template |
||
96 | * @param Closure $callable |
||
97 | * |
||
98 | * @return $this |
||
99 | */ |
||
100 | public function attachCallable($hook, $template, Closure $callable) |
||
109 | } |
||
110 |
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.