private function processQuery($id, $method, $arguments)
    {
        try {
            $result = $this->evaluator->evaluate($method, $arguments);
            return self::response($id, $result);
        } catch (Exception $exception) {
            $code = $exception->getCode();
            $message = $exception->getMessage();
            $data = $exception->getData();

            return self::error($id, $code, $message, $data);
        }
    }
private function processQuery($id, $method, $arguments)
    {
        try {
            $result = $this->evaluator->evaluate($method, $arguments);
            return self::response($id, $result);
        } catch (Exception $exception) {
            $code = $exception->getCode();
            $message = $exception->getMessage();
            $data = $exception->getData();

            return self::error($id, $code, $message, $data);
        }
    }
private function processQuery ( $ id , $ method , $ arguments ) { try { $ result = $ this -> evaluator -> evaluate ( $ method , $ arguments ) ; return self :: response ( $ id , $ result ) ; } catch ( Exception $ exception ) { $ code = $ exception -> getCode ( ) ; $ message = $ exception -> getMessage ( ) ; $ data = $ exception -> getData ( ) ; return self :: error ( $ id , $ code , $ message , $ data ) ; } }
Processes a query request and prepares the response.

@param mixed $id
Client-supplied value that allows the client to associate the server response
with the original query.

@param string $method
String value representing a method to invoke on the server.

@param array $arguments
Array of arguments that will be passed to the method.

@return array
Returns a response object or an error object.
Processes a query request and prepares the response .