public function request($verb, array $params = array())
    {
        if (! $this->url) {
            throw new RuntimeException("Cannot perform request when URL not set.  Use setUrl() method");
        }

        //Build the URL
        $params = array_merge(array('verb' => $verb), $params);
        $url = $this->url . (parse_url($this->url, PHP_URL_QUERY) ? '&' : '?') . http_build_query($params);

        //Do the request
        try {
            $resp = $this->httpAdapter->request($url);
            return $this->decodeResponse($resp);
        } catch (HttpException $e) {
            $this->checkForOaipmhException($e);
        }
    }
public function request($verb, array $params = array())
    {
        if (! $this->url) {
            throw new RuntimeException("Cannot perform request when URL not set.  Use setUrl() method");
        }

        //Build the URL
        $params = array_merge(array('verb' => $verb), $params);
        $url = $this->url . (parse_url($this->url, PHP_URL_QUERY) ? '&' : '?') . http_build_query($params);

        //Do the request
        try {
            $resp = $this->httpAdapter->request($url);
            return $this->decodeResponse($resp);
        } catch (HttpException $e) {
            $this->checkForOaipmhException($e);
        }
    }
public function request ( $ verb , array $ params = array ( ) ) { if ( ! $ this -> url ) { throw new RuntimeException ( "Cannot perform request when URL not set.  Use setUrl() method" ) ; } //Build the URL $ params = array_merge ( array ( 'verb' => $ verb ) , $ params ) ; $ url = $ this -> url . ( parse_url ( $ this -> url , PHP_URL_QUERY ) ? '&' : '?' ) . http_build_query ( $ params ) ; //Do the request try { $ resp = $ this -> httpAdapter -> request ( $ url ) ; return $ this -> decodeResponse ( $ resp ) ; } catch ( HttpException $ e ) { $ this -> checkForOaipmhException ( $ e ) ; } }
Perform a request and return a OAI SimpleXML Document

@param  string            $verb   Which OAI-PMH verb to use
@param  array             $params An array of key/value parameters
@return \SimpleXMLElement An XML document
Perform a request and return a OAI SimpleXML Document