Scalr\Api\Rest\Controller\ApiController::__call PHP Méthode

__call() public méthode

public __call ( $method, $args )
    public function __call($method, $args)
    {
        if (method_exists($this, $method . 'Action')) {
            //Processes common query parameters such as pageNum or maxResults
            $this->processCommonQueryParameters();
            $this->response->setContentType("application/json", "utf-8");
            $result = call_user_func_array([$this, $method . 'Action'], $args);
            if (is_object($result) || is_array($result)) {
                $this->response->setBody(json_encode($result));
                return true;
            } else {
                return $result;
            }
        } else {
            throw new \Exception(sprintf("Method %sAction() does not exist in the %s controller", $method, get_class($this)));
        }
    }