| @@ 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 | ||
| @@ 234-243 (lines=10) @@ | ||
| 231 | * @param string $component_name |
|
| 232 | * @param array $args |
|
| 233 | */ |
|
| 234 | public function __call(string $component_name, array $args) |
|
| 235 | { |
|
| 236 | if (! method_exists($this, $component_name)) { |
|
| 237 | $this->{$component_name} = Closure::bind( |
|
| 238 | function () use ($component_name) { |
|
| 239 | return $this->component($component_name); |
|
| 240 | }, $this, get_class()); |
|
| 241 | } |
|
| 242 | ||
| 243 | return call_user_func($this->{$component_name}, $args); |
|
| 244 | } |
|
| 245 | ||
| 246 | /** |
|