Scalr\Service\Aws\Client\SoapClient::call PHP Method

call() public method

public call ( $action, $options, $path = '/' )
    public function call($action, $options, $path = '/')
    {
        if (empty($options)) {
            $res = $this->{$action}();
        } else {
            //Options array must be compartible with wsdl schema definition.
            $res = $this->{$action}($options);
        }
        if ($this->getAws() && $this->getAws()->getDebug()) {
            echo "\n";
            echo $this->__getLastRequest() . "\n";
            echo $this->__getLastResponseHeaders() . "\n";
            echo $this->__getLastResponse() . "\n";
        }
        $dom = new \DOMDocument();
        $dom->loadXML($this->__getLastResponse());
        if (($nodeList = $dom->getElementsByTagName($action . 'Response')) && $nodeList->length) {
            $node = $nodeList->item(0);
        }
        $response = new SoapClientResponse(isset($node) ? $dom->saveXML($node) : $this->__getLastResponse(), $this->__getLastResponseHeaders(), $this->__getLastRequest());
        $this->_incrementQueriesQuantity();
        unset($dom);
        return $response;
    }