Snorlax\RestResource::__call PHP Method

__call() public method

Calls the method contained in the actions of this resource
public __call ( string $method, array $args ) : StdClass
$method string
$args array
return StdClass The JSON decoded response
    public function __call($method, $args)
    {
        $action = $this->getActions()[$method];
        $uri = $this->getBaseUri() . $this->getPath($action, $args);
        $params = $this->getParams($args);
        $this->last_response = $this->client->request($action['method'], $uri, $params);
        $response = $this->last_response->getBody();
        return $this->parse($response);
    }