original_string: public function handle($request = null)
      {
          // Check if request was passed otherwise get it from the server
          if ($request === null || !$request instanceof Zend_Amf_Request) {
              $request = $this->getRequest();
          } else {
              $this->setRequest($request);
          }
          if ($this->isSession()) {
               // Check if a session is being sent from the amf call
               if (isset($_COOKIE[$this->_sessionName])) {
                   session_id($_COOKIE[$this->_sessionName]);
               }
          }
  
          // Check for errors that may have happend in deserialization of Request.
          try {
              // Take converted PHP objects and handle service call.
              // Serialize to Zend_Amf_response for output stream
              $this->_handle($request);
              $response = $this->getResponse();
          } catch (Exception $e) {
              // Handle any errors in the serialization and service  calls.
              require_once 'Zend/Amf/Server/Exception.php';
              throw new Zend_Amf_Server_Exception('Handle error: ' . $e->getMessage() . ' ' . $e->getLine(), 0, $e);
          }
  
          // Return the Amf serialized output string
          return $response;
      }
code: public function handle($request = null)
      {
          // Check if request was passed otherwise get it from the server
          if ($request === null || !$request instanceof Zend_Amf_Request) {
              $request = $this->getRequest();
          } else {
              $this->setRequest($request);
          }
          if ($this->isSession()) {
               // Check if a session is being sent from the amf call
               if (isset($_COOKIE[$this->_sessionName])) {
                   session_id($_COOKIE[$this->_sessionName]);
               }
          }
  
          // Check for errors that may have happend in deserialization of Request.
          try {
              // Take converted PHP objects and handle service call.
              // Serialize to Zend_Amf_response for output stream
              $this->_handle($request);
              $response = $this->getResponse();
          } catch (Exception $e) {
              // Handle any errors in the serialization and service  calls.
              require_once 'Zend/Amf/Server/Exception.php';
              throw new Zend_Amf_Server_Exception('Handle error: ' . $e->getMessage() . ' ' . $e->getLine(), 0, $e);
          }
  
          // Return the Amf serialized output string
          return $response;
      }
code_tokens: public function handle ( $ request = null ) { // Check if request was passed otherwise get it from the server if ( $ request === null || ! $ request instanceof Zend_Amf_Request ) { $ request = $ this -> getRequest ( ) ; } else { $ this -> setRequest ( $ request ) ; } if ( $ this -> isSession ( ) ) { // Check if a session is being sent from the amf call if ( isset ( $ _COOKIE [ $ this -> _sessionName ] ) ) { session_id ( $ _COOKIE [ $ this -> _sessionName ] ) ; } } // Check for errors that may have happend in deserialization of Request. try { // Take converted PHP objects and handle service call. // Serialize to Zend_Amf_response for output stream $ this -> _handle ( $ request ) ; $ response = $ this -> getResponse ( ) ; } catch ( Exception $ e ) { // Handle any errors in the serialization and service  calls. require_once 'Zend/Amf/Server/Exception.php' ; throw new Zend_Amf_Server_Exception ( 'Handle error: ' . $ e -> getMessage ( ) . ' ' . $ e -> getLine ( ) , 0 , $ e ) ; } // Return the Amf serialized output string return $ response ; }
docstring: Handle an AMF call from the gateway.
  
  @param  null|Zend_Amf_Request $request Optional
  @return Zend_Amf_Response
docstring_tokens: Handle an AMF call from the gateway .