original_string: public function execute( $className )
      {
          $this->className = $className;
          
          // Parse the request
          $rawRequest = file_get_contents( 'php://input' );
          /* @var $request array */
          $request = json_decode( $rawRequest, true );
  
          // Is valid request?
          if( $request == false )
          {
              throw new MRPCJsonServerException( sprintf( 'Invalid body (%s).', $rawRequest ) );
          }
  
          // Does the request respect the 2.0 specification?
          if( $request['jsonrpc'] != '2.0' )
          {
              throw new MRPCJsonServerException( sprintf( 'The request does not respect the 2.0 specification.' ) );
          }
  
          // Set the request properties
          $this->request = new MRPCJsonRequest();
          $this->request
              ->setMethod( $request['method'] )
              ->setParams( $request['params'] )
              ->setId( $request['id'] );
  
          // Call the procedure/member
          $callResponse = call_user_func(
              array( $this, $this->request->getMethod() )
              , $this->request->getParams() );
  
          // Does the call fail?
          if( $callResponse === false )
          {
              throw new MRPCJsonServerException( 'Invalid method name.' );
          }
      }
code: public function execute( $className )
      {
          $this->className = $className;
          
          // Parse the request
          $rawRequest = file_get_contents( 'php://input' );
          /* @var $request array */
          $request = json_decode( $rawRequest, true );
  
          // Is valid request?
          if( $request == false )
          {
              throw new MRPCJsonServerException( sprintf( 'Invalid body (%s).', $rawRequest ) );
          }
  
          // Does the request respect the 2.0 specification?
          if( $request['jsonrpc'] != '2.0' )
          {
              throw new MRPCJsonServerException( sprintf( 'The request does not respect the 2.0 specification.' ) );
          }
  
          // Set the request properties
          $this->request = new MRPCJsonRequest();
          $this->request
              ->setMethod( $request['method'] )
              ->setParams( $request['params'] )
              ->setId( $request['id'] );
  
          // Call the procedure/member
          $callResponse = call_user_func(
              array( $this, $this->request->getMethod() )
              , $this->request->getParams() );
  
          // Does the call fail?
          if( $callResponse === false )
          {
              throw new MRPCJsonServerException( 'Invalid method name.' );
          }
      }
code_tokens: public function execute ( $ className ) { $ this -> className = $ className ; // Parse the request $ rawRequest = file_get_contents ( 'php://input' ) ; /* @var $request array */ $ request = json_decode ( $ rawRequest , true ) ; // Is valid request? if ( $ request == false ) { throw new MRPCJsonServerException ( sprintf ( 'Invalid body (%s).' , $ rawRequest ) ) ; } // Does the request respect the 2.0 specification? if ( $ request [ 'jsonrpc' ] != '2.0' ) { throw new MRPCJsonServerException ( sprintf ( 'The request does not respect the 2.0 specification.' ) ) ; } // Set the request properties $ this -> request = new MRPCJsonRequest ( ) ; $ this -> request -> setMethod ( $ request [ 'method' ] ) -> setParams ( $ request [ 'params' ] ) -> setId ( $ request [ 'id' ] ) ; // Call the procedure/member $ callResponse = call_user_func ( array ( $ this , $ this -> request -> getMethod ( ) ) , $ this -> request -> getParams ( ) ) ; // Does the call fail? if ( $ callResponse === false ) { throw new MRPCJsonServerException ( 'Invalid method name.' ) ; } }
docstring: Reads the request and run the web method.
  
  @param $className
  @throws MRPCJsonServerException
docstring_tokens: Reads the request and run the web method .