當前位置: 首頁>>代碼示例>>PHP>>正文


PHP C14NGeneral函數代碼示例

本文整理匯總了PHP中C14NGeneral函數的典型用法代碼示例。如果您正苦於以下問題:PHP C14NGeneral函數的具體用法?PHP C14NGeneral怎麽用?PHP C14NGeneral使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了C14NGeneral函數的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: canonicalizeData

 private function canonicalizeData($node, $canonicalmethod)
 {
     $exclusive = FALSE;
     $withComments = FALSE;
     switch ($canonicalmethod) {
         case 'http://www.w3.org/TR/2001/REC-xml-c14n-20010315':
             $exclusive = FALSE;
             $withComments = FALSE;
             break;
         case 'http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments':
             $withComments = TRUE;
             break;
         case 'http://www.w3.org/2001/10/xml-exc-c14n#':
             $exclusive = TRUE;
             break;
         case 'http://www.w3.org/2001/10/xml-exc-c14n#WithComments':
             $exclusive = TRUE;
             $withComments = TRUE;
             break;
     }
     /* Support PHP versions < 5.2 not containing C14N methods in DOM extension */
     $php_version = explode('.', PHP_VERSION);
     if ($php_version[0] < 5 || $php_version[0] == 5 && $php_version[1] < 2) {
         return C14NGeneral($node, $exclusive, $withComments);
     }
     return $node->C14N($exclusive, $withComments);
 }
開發者ID:aenetworks,項目名稱:exacttarget,代碼行數:27,代碼來源:xmlseclibs.php

示例2: canonicalizeData

 private function canonicalizeData($node, $canonicalmethod, $arXPath = NULL, $prefixList = NULL)
 {
     $exclusive = FALSE;
     $withComments = FALSE;
     switch ($canonicalmethod) {
         case 'http://www.w3.org/TR/2001/REC-xml-c14n-20010315':
             $exclusive = FALSE;
             $withComments = FALSE;
             break;
         case 'http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments':
             $withComments = TRUE;
             break;
         case 'http://www.w3.org/2001/10/xml-exc-c14n#':
             $exclusive = TRUE;
             break;
         case 'http://www.w3.org/2001/10/xml-exc-c14n#WithComments':
             $exclusive = TRUE;
             $withComments = TRUE;
             break;
     }
     /* Support PHP versions < 5.2 not containing C14N methods in DOM extension */
     $php_version = explode('.', PHP_VERSION);
     if ($php_version[0] < 5 || $php_version[0] == 5 && $php_version[1] < 2) {
         if (!is_null($arXPath)) {
             throw new Exception("PHP 5.2.0 or higher is required to perform XPath Transformations");
         }
         return C14NGeneral($node, $exclusive, $withComments);
     }
     return $node->C14N($exclusive, $withComments, $arXPath, $prefixList);
 }
開發者ID:MexinaD,項目名稱:SuiteCRM,代碼行數:30,代碼來源:xmlseclibs.php

示例3: canonicalizeData

 private function canonicalizeData($node, $canonicalmethod, $arXPath = NULL, $prefixList = NULL)
 {
     $exclusive = FALSE;
     $withComments = FALSE;
     switch ($canonicalmethod) {
         case 'http://www.w3.org/TR/2001/REC-xml-c14n-20010315':
             $exclusive = FALSE;
             $withComments = FALSE;
             break;
         case 'http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments':
             $withComments = TRUE;
             break;
         case 'http://www.w3.org/2001/10/xml-exc-c14n#':
             $exclusive = TRUE;
             break;
         case 'http://www.w3.org/2001/10/xml-exc-c14n#WithComments':
             $exclusive = TRUE;
             $withComments = TRUE;
             break;
     }
     /* Support PHP versions < 5.2 not containing C14N methods in DOM extension */
     $php_version = explode('.', PHP_VERSION);
     if ($php_version[0] < 5 || $php_version[0] == 5 && $php_version[1] < 2) {
         if (!is_null($arXPath)) {
             throw new Exception("PHP 5.2.0 or higher is required to perform XPath Transformations");
         }
         return C14NGeneral($node, $exclusive, $withComments);
     }
     if (is_null($arXPath) && $node instanceof DOMNode && $node->ownerDocument !== NULL && $node->isSameNode($node->ownerDocument->documentElement)) {
         /* Check for any PI or comments as they would have been excluded */
         $element = $node;
         while ($refnode = $element->previousSibling) {
             if ($refnode->nodeType == XML_PI_NODE || $refnode->nodeType == XML_COMMENT_NODE && $withComments) {
                 break;
             }
             $element = $refnode;
         }
         if ($refnode == NULL) {
             $node = $node->ownerDocument;
         }
     }
     return $node->C14N($exclusive, $withComments, $arXPath, $prefixList);
 }
開發者ID:faxe-kommune,項目名稱:OS2loop,代碼行數:43,代碼來源:xmlseclibs.php


注:本文中的C14NGeneral函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。