/**
  * Loads the command handler and processes a command sent from the mobile
  *
  * @access public
  * @return boolean
  */
 public static function HandleRequest()
 {
     $handler = ZPush::GetRequestHandlerForCommand(Request::GetCommandCode());
     // if there is an error decoding wbxml, consume remaining data and include it in the WBXMLException
     if (!$handler->Handle(Request::GetCommandCode())) {
         $wbxmlLog = "no decoder";
         if (self::$decoder) {
             self::$decoder->readRemainingData();
             $wbxmlLog = self::$decoder->getWBXMLLog();
         }
         throw new WBXMLException("Debug data: " . $wbxmlLog);
     }
     // also log WBXML in happy case
     if (self::$decoder && @constant('WBXML_DEBUG') === true) {
         ZLog::Write(LOGLEVEL_WBXML, "WBXML-IN : " . self::$decoder->getWBXMLLog(), false);
     }
 }
 /**
  * Loads the command handler and processes a command sent from the mobile
  *
  * @access public
  * @return boolean
  */
 public static function HandleRequest()
 {
     $handler = ZPush::GetRequestHandlerForCommand(Request::GetCommandCode());
     // TODO handle WBXML exceptions here and print stack
     return $handler->Handle(Request::GetCommandCode());
 }
 /**
  * Loads the command handler and processes a command sent from the mobile
  *
  * @access public
  * @return boolean
  */
 public static function HandleRequest()
 {
     $handler = ZPush::GetRequestHandlerForCommand(Request::GetCommandCode());
     // if there is an error decoding wbxml, consume remaining data and include it in the WBXMLException
     try {
         if (!$handler->Handle(Request::GetCommandCode())) {
             throw new WBXMLException(sprintf("Unknown error in %s->Handle()", get_class($handler)));
         }
     } catch (Exception $ex) {
         ZLog::Write(LOGLEVEL_FATAL, "WBXML debug data: " . Request::GetInputAsBase64(), false);
         throw $ex;
     }
     // also log WBXML in happy case
     if (ZLog::WbxmlDebug()) {
         ZLog::Write(LOGLEVEL_WBXML, "WBXML-IN : " . Request::GetInputAsBase64(), false);
     }
 }