当前位置: 首页>>代码示例>>PHP>>正文


PHP ZLog::WbxmlDebug方法代码示例

本文整理汇总了PHP中ZLog::WbxmlDebug方法的典型用法代码示例。如果您正苦于以下问题:PHP ZLog::WbxmlDebug方法的具体用法?PHP ZLog::WbxmlDebug怎么用?PHP ZLog::WbxmlDebug使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ZLog的用法示例。


在下文中一共展示了ZLog::WbxmlDebug方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 public function __construct($output, $multipart = false)
 {
     $this->log = ZLog::WbxmlDebug();
     $this->_out = $output;
     // reverse-map the DTD
     foreach ($this->dtd["namespaces"] as $nsid => $nsname) {
         $this->_dtd["namespaces"][$nsname] = $nsid;
     }
     foreach ($this->dtd["codes"] as $cp => $value) {
         $this->_dtd["codes"][$cp] = array();
         foreach ($this->dtd["codes"][$cp] as $tagid => $tagname) {
             $this->_dtd["codes"][$cp][$tagname] = $tagid;
         }
     }
     $this->_stack = array();
     $this->multipart = $multipart;
     $this->bodyparts = array();
 }
开发者ID:EGroupware,项目名称:z-push,代码行数:18,代码来源:wbxmlencoder.php

示例2: HandleRequest

 /**
  * 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);
     }
 }
开发者ID:EGroupware,项目名称:z-push,代码行数:23,代码来源:requestprocessor.php

示例3: __construct

 /**
  * WBXML Decode Constructor
  * We only handle ActiveSync WBXML, which is a subset of WBXML
  *
  * @param  stream      $input          the incoming data stream
  *
  * @access public
  */
 public function __construct($input)
 {
     $this->log = ZLog::WbxmlDebug();
     $this->in = $input;
     $version = $this->getByte();
     if ($version != self::VERSION) {
         $this->inputBuffer .= chr($version);
         $this->isWBXML = false;
         return;
     }
     $publicid = $this->getMBUInt();
     if ($publicid !== 1) {
         throw new WBXMLException("Wrong publicid : " . $publicid);
     }
     $charsetid = $this->getMBUInt();
     if ($charsetid !== 106) {
         throw new WBXMLException("Wrong charset : " . $charsetid);
     }
     $stringtablesize = $this->getMBUInt();
     if ($stringtablesize !== 0) {
         throw new WBXMLException("Wrong string table size : " . $stringtablesize);
     }
 }
开发者ID:EGroupware,项目名称:z-push,代码行数:31,代码来源:wbxmldecoder.php


注:本文中的ZLog::WbxmlDebug方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。