public function call($method, $arguments = array())
    {
        $arguments = array_merge(array('auth_string' => self::getCredentials()->getAuthString()), $arguments);
        $method = 'didww_' . $method;
        $timeStart = microtime(true);

        try {
            $result = $this->_client->__soapCall($method, $arguments);

        } catch (\Exception $e) {
            if (self::$_debug) {
                $this->debug("raw request", $this->_client->__getLastRequest());
                $this->debug("raw response", $this->_client->__getLastResponse());
            }
            throw $e;
        }

        if (self::$_debug) {
            $this->debug("raw request", $this->_client->__getLastRequest());
            $this->debug("raw response", $this->_client->__getLastResponse());
        }

        /**
         * check if api returned error and throw exception
         */
        if (isset($result->error) && $result->error > 0) {
            $message = isset (self::$_errorCodes[$result->error]) ? self::$_errorCodes[$result->error] :
                'Unknown error with code : ' . $result->error;
            throw new ApiClientException($message);
        }

        $timeFinish = microtime(true);
        $this->time = $timeFinish - $timeStart;
        if (self::$_debug) {
            $this->debug("response from $method:", $result);
        }


        return (array)$result;
    }
public function call($method, $arguments = array())
    {
        $arguments = array_merge(array('auth_string' => self::getCredentials()->getAuthString()), $arguments);
        $method = 'didww_' . $method;
        $timeStart = microtime(true);

        try {
            $result = $this->_client->__soapCall($method, $arguments);

        } catch (\Exception $e) {
            if (self::$_debug) {
                $this->debug("raw request", $this->_client->__getLastRequest());
                $this->debug("raw response", $this->_client->__getLastResponse());
            }
            throw $e;
        }

        if (self::$_debug) {
            $this->debug("raw request", $this->_client->__getLastRequest());
            $this->debug("raw response", $this->_client->__getLastResponse());
        }

        /**
         * check if api returned error and throw exception
         */
        if (isset($result->error) && $result->error > 0) {
            $message = isset (self::$_errorCodes[$result->error]) ? self::$_errorCodes[$result->error] :
                'Unknown error with code : ' . $result->error;
            throw new ApiClientException($message);
        }

        $timeFinish = microtime(true);
        $this->time = $timeFinish - $timeStart;
        if (self::$_debug) {
            $this->debug("response from $method:", $result);
        }


        return (array)$result;
    }
public function call ( $ method , $ arguments = array ( ) ) { $ arguments = array_merge ( array ( 'auth_string' => self :: getCredentials ( ) -> getAuthString ( ) ) , $ arguments ) ; $ method = 'didww_' . $ method ; $ timeStart = microtime ( true ) ; try { $ result = $ this -> _client -> __soapCall ( $ method , $ arguments ) ; } catch ( \ Exception $ e ) { if ( self :: $ _debug ) { $ this -> debug ( "raw request" , $ this -> _client -> __getLastRequest ( ) ) ; $ this -> debug ( "raw response" , $ this -> _client -> __getLastResponse ( ) ) ; } throw $ e ; } if ( self :: $ _debug ) { $ this -> debug ( "raw request" , $ this -> _client -> __getLastRequest ( ) ) ; $ this -> debug ( "raw response" , $ this -> _client -> __getLastResponse ( ) ) ; } /**
         * check if api returned error and throw exception
         */ if ( isset ( $ result -> error ) && $ result -> error > 0 ) { $ message = isset ( self :: $ _errorCodes [ $ result -> error ] ) ? self :: $ _errorCodes [ $ result -> error ] : 'Unknown error with code : ' . $ result -> error ; throw new ApiClientException ( $ message ) ; } $ timeFinish = microtime ( true ) ; $ this -> time = $ timeFinish - $ timeStart ; if ( self :: $ _debug ) { $ this -> debug ( "response from $method:" , $ result ) ; } return ( array ) $ result ; }
method to call didww api 2 soap method
@param string $method
@param array $arguments
@return mixed
@throws ApiClientException
method to call didww api 2 soap method