src/Core/Assets/Mixin.php 1 location
|
@@ 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( |
84 |
|
function () use ($component_name) { |
85 |
|
return $this->component($component_name); |
86 |
|
}, $this, get_class()); |
87 |
|
} |
88 |
|
|
89 |
|
return call_user_func($this->{$component_name}, $args); |
90 |
|
} |
91 |
|
|
92 |
|
/** |
src/Core/Entity.php 1 location
|
@@ 239-249 (lines=11) @@
|
236 |
|
* @param string $component_name |
237 |
|
* @param array $args |
238 |
|
*/ |
239 |
|
public function __call(string $component_name, array $args) |
240 |
|
{ |
241 |
|
if (! method_exists($this, $component_name)) { |
242 |
|
$this->{$component_name} = Closure::bind( |
243 |
|
function () use ($component_name) { |
244 |
|
return $this->component($component_name); |
245 |
|
}, $this, get_class()); |
246 |
|
} |
247 |
|
|
248 |
|
return call_user_func($this->{$component_name}, $args); |
249 |
|
} |
250 |
|
|
251 |
|
/** |
252 |
|
* Create and add DOM element of the entity |
src/Core/Scene.php 1 location
|
@@ 256-266 (lines=11) @@
|
253 |
|
* @param string $component_name |
254 |
|
* @param array $args |
255 |
|
*/ |
256 |
|
public function callComponent(string $component_name, array $args) |
257 |
|
{ |
258 |
|
if (! method_exists($this, $component_name)) { |
259 |
|
$this->{$component_name} = Closure::bind( |
260 |
|
function () use ($component_name) { |
261 |
|
return $this->component($component_name); |
262 |
|
}, $this, get_class()); |
263 |
|
} |
264 |
|
|
265 |
|
return call_user_func($this->{$component_name}, $args); |
266 |
|
} |
267 |
|
|
268 |
|
/** |
269 |
|
* Add everyting to DOM |