public function handle(Request $request)
    {
        try {
            $restRequest = new RestRequest($this->config, $request->getMethod(), $request->getUri(), $request->getContent());
            $restResponse = $this->adapter->processRequest($restRequest);
        } catch (\Exception $e) {
            if (true === $this->debugEnabled()) {
                throw $e;
            }
            $restResponse = $this->adapter->handleException($e);
        }
        return new Response($restResponse->getContent(), $restResponse->getStatus(), $restResponse->getHeaders());
    }
public function handle(Request $request)
    {
        try {
            $restRequest = new RestRequest($this->config, $request->getMethod(), $request->getUri(), $request->getContent());
            $restResponse = $this->adapter->processRequest($restRequest);
        } catch (\Exception $e) {
            if (true === $this->debugEnabled()) {
                throw $e;
            }
            $restResponse = $this->adapter->handleException($e);
        }
        return new Response($restResponse->getContent(), $restResponse->getStatus(), $restResponse->getHeaders());
    }
public function handle ( Request $ request ) { try { $ restRequest = new RestRequest ( $ this -> config , $ request -> getMethod ( ) , $ request -> getUri ( ) , $ request -> getContent ( ) ) ; $ restResponse = $ this -> adapter -> processRequest ( $ restRequest ) ; } catch ( \ Exception $ e ) { if ( true === $ this -> debugEnabled ( ) ) { throw $ e ; } $ restResponse = $ this -> adapter -> handleException ( $ e ) ; } return new Response ( $ restResponse -> getContent ( ) , $ restResponse -> getStatus ( ) , $ restResponse -> getHeaders ( ) ) ; }
Processes an incoming Request object, routes it to the adapter, and returns a response.

@param   Request     $request
@return  Response    $response
Processes an incoming Request object routes it to the adapter and returns a response .