lithium\data\Model::__call PHP 메소드

__call() 공개 메소드

Magic method that allows calling Model::_instanceMethods's closure like normal methods on the model instance.
또한 보기: 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.
리턴 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);
    }