| @@ 182-191 (lines=10) @@ | ||
| 179 | * @param string $component_name |
|
| 180 | * @param array $args |
|
| 181 | */ |
|
| 182 | public function __call(string $component_name, array $args) |
|
| 183 | { |
|
| 184 | if (! method_exists($this, $component_name)) { |
|
| 185 | $this->{$component_name} = Closure::bind(function () use ($component_name) { |
|
| 186 | return $this->component($component_name); |
|
| 187 | }, $this, get_class()); |
|
| 188 | } |
|
| 189 | ||
| 190 | return call_user_func($this->{$component_name}, $args); |
|
| 191 | } |
|
| 192 | ||
| 193 | /** |
|
| 194 | * Create and add DOM element of the entity |
|
| @@ 82-91 (lines=10) @@ | ||
| 79 | * @param string $component_name |
|
| 80 | * @param array $args |
|
| 81 | */ |
|
| 82 | public function __call(string $component_name, array $args) |
|
| 83 | { |
|
| 84 | if (! method_exists($this, $component_name)) { |
|
| 85 | $this->{$component_name} = Closure::bind(function () use ($component_name) { |
|
| 86 | return $this->component($component_name); |
|
| 87 | }, $this, get_class()); |
|
| 88 | } |
|
| 89 | ||
| 90 | return call_user_func($this->{$component_name}, $args); |
|
| 91 | } |
|
| 92 | } |
|
| 93 | ||