当前位置: 首页>>代码示例>>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;未经允许,请勿转载。