當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。