| @@ 80-89 (lines=10) @@ | ||
| 77 | * @param string $component_name |
|
| 78 | * @param array $args |
|
| 79 | */ |
|
| 80 | public function __call(string $component_name, array $args) |
|
| 81 | { |
|
| 82 | if (! method_exists($this, $component_name)) { |
|
| 83 | $this->{$component_name} = Closure::bind(function () use ($component_name) { |
|
| 84 | return $this->component($component_name); |
|
| 85 | }, $this, get_class()); |
|
| 86 | } |
|
| 87 | ||
| 88 | return call_user_func($this->{$component_name}, $args); |
|
| 89 | } |
|
| 90 | } |
|
| 91 | ||
| @@ 190-199 (lines=10) @@ | ||
| 187 | * @param string $component_name |
|
| 188 | * @param array $args |
|
| 189 | */ |
|
| 190 | public function __call(string $component_name, array $args) |
|
| 191 | { |
|
| 192 | if (! method_exists($this, $component_name)) { |
|
| 193 | $this->{$component_name} = Closure::bind(function () use ($component_name) { |
|
| 194 | return $this->component($component_name); |
|
| 195 | }, $this, get_class()); |
|
| 196 | } |
|
| 197 | ||
| 198 | return call_user_func($this->{$component_name}, $args); |
|
| 199 | } |
|
| 200 | ||
| 201 | /** |
|
| 202 | * Create and add DOM element of the entity |
|