__call() public méthode

When a non-existant method is called, this checks to see if any hooks have been defined and sends the call to them. Hooks are defined by preceding the "hookable" method in a descending class with 3 underscores, like __myMethod(). When the API calls $myObject->myMethod(), it gets sent to $myObject->___myMethod() after any 'before' hooks have been called. Then after the ___myMethod() call, any "after" hooks are then called. "after" hooks have the opportunity to change the return value. Hooks can also be added for methods that don't actually exist in the class, allowing another class to add methods to this class. See the Wire::runHooks() method for the full implementation of hook calls.
public __call ( string $method, array $arguments ) : mixed
$method string
$arguments array
Résultat mixed
 public function __call($method, $arguments)
 {
     if (method_exists($this, "___{$method}")) {
         return parent::__call($method, $arguments);
     }
     $value = $this->__get($method);
     if (is_object($value)) {
         return call_user_func_array(array($value, '__invoke'), $arguments);
     }
     return parent::__call($method, $arguments);
 }