lithium\data\Model::__call PHP Method

__call() public method

Magic method that allows calling Model::_instanceMethods's closure like normal methods on the model instance.
See also: lithium\data\Model::instanceMethods
public __call ( string $method, array $params ) : mixed
$method string Method name caught by `__call()`.
$params array Arguments given to the above `$method` call.
return mixed
    public function __call($method, $params)
    {
        $methods = static::instanceMethods();
        if (isset($methods[$method]) && is_callable($methods[$method])) {
            return call_user_func_array($methods[$method], $params);
        }
        $message = "Unhandled method call `{$method}`.";
        throw new BadMethodCallException($message);
    }