flight\Engine::__call PHP Method

__call() public method

Handles calls to class methods.
public __call ( string $name, array $params ) : mixed
$name string Method name
$params array Method parameters
return mixed Callback results
    public function __call($name, $params)
    {
        $callback = $this->dispatcher->get($name);
        if (is_callable($callback)) {
            return $this->dispatcher->run($name, $params);
        }
        if (!$this->loader->get($name)) {
            throw new \Exception("{$name} must be a mapped method.");
        }
        $shared = !empty($params) ? (bool) $params[0] : true;
        return $this->loader->load($name, $shared);
    }