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


PHP _MiniXMLLog函数代码示例

本文整理汇总了PHP中_MiniXMLLog函数的典型用法代码示例。如果您正苦于以下问题:PHP _MiniXMLLog函数的具体用法?PHP _MiniXMLLog怎么用?PHP _MiniXMLLog使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: toString

 function toString($depth = 0)
 {
     $retString = $this->xxmlDoc->toString($depth);
     if ($depth == MINIXML_NOWHITESPACES) {
         $xmlhead = "<?xml version=\"1.0\"\\1?>";
     } else {
         $xmlhead = "<?xml version=\"1.0\"\\1?>\n ";
     }
     $search = array("/<PSYCHOGENIC_ROOT_ELEMENT([^>]*)>\\s*/smi", "/<\\/PSYCHOGENIC_ROOT_ELEMENT>/smi");
     $replace = array($xmlhead, "");
     $retString = preg_replace($search, $replace, $retString);
     if (MINIXML_DEBUG > 0) {
         _MiniXMLLog("MiniXML::toString() Returning XML:\n{$retString}\n\n");
     }
     return $retString;
 }
开发者ID:Sajaki,项目名称:wowroster_dev,代码行数:16,代码来源:doc.inc.php

示例2: toStringNoWhiteSpaces

 function toStringNoWhiteSpaces()
 {
     if (MINIXML_DEBUG > 0) {
         _MiniXMLLog("MiniXMLNode::toStringNoWhiteSpaces() call with depth {$depth}");
     }
     if (!is_null($this->xtext)) {
         /* a text element */
         $retStr = $this->xtext;
     } elseif (!is_null($this->xnumeric)) {
         /* a numeric element */
         $retStr = $this->xnumeric;
     }
     return $retStr;
 }
开发者ID:jabouzi,项目名称:belron,代码行数:14,代码来源:node.inc.php

示例3: toStringNoWhiteSpaces

 function toStringNoWhiteSpaces()
 {
     $retString = '';
     $attribString = '';
     $elementName = $this->xname;
     foreach ($this->xattributes as $attrname => $attrvalue) {
         $attribString .= "{$attrname}=\"{$attrvalue}\" ";
     }
     $retString = "<{$elementName}";
     if ($attribString) {
         $attribString = rtrim($attribString);
         $retString .= " {$attribString}";
     }
     if (!$this->xnumChildren) {
         /* No kids -> no sub-elements, no text, nothing - consider a <unary/> element */
         $retString .= " />";
         return $retString;
     }
     /* If we've gotten this far, the element has
      ** kids or text - consider a <binary>otherstuff</binary> element
      */
     $retString .= ">";
     /* Loop over all kids, getting associated strings */
     for ($i = 0; $i < $this->xnumChildren; $i++) {
         if (method_exists($this->xchildren[$i], 'toStringNoWhiteSpaces')) {
             $newStr = $this->xchildren[$i]->toStringNoWhiteSpaces();
             if (!is_null($newStr)) {
                 $retString .= $newStr;
             }
         } else {
             _MiniXMLLog("Invalid child found in {$elementName}");
         }
         /* end if has a toString method */
     }
     /* end loop over all children */
     /* add the indented closing tag */
     $retString .= "</{$elementName}>";
     return $retString;
 }
开发者ID:BackupTheBerlios,项目名称:kmit-svn,代码行数:39,代码来源:element.inc.php


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