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


PHP fDOMDocument::createDocumentFragment方法代码示例

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


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

示例1: __construct

 public function __construct($line, $comment)
 {
     $this->startLine = $line;
     $dom = new fDOMDocument();
     $this->fragment = $dom->createDocumentFragment();
     $this->parse($this->normalizeSplit($comment));
 }
开发者ID:webkingashu,项目名称:phpdox,代码行数:7,代码来源:InlineComment.php

示例2: getGeneralBuildInfo

 private function getGeneralBuildInfo()
 {
     if ($this->buildInfo != NULL) {
         return $this->buildInfo;
     }
     $dom = new fDOMDocument();
     $this->buildInfo = $dom->createDocumentFragment();
     $dateNode = $dom->createElementNS(self::XMLNS, 'date');
     $this->buildInfo->appendChild($dateNode);
     $date = new \DateTime('now');
     $dateNode->setAttribute('unix', $date->getTimestamp());
     $dateNode->setAttribute('date', $date->format('d-m-Y'));
     $dateNode->setAttribute('time', $date->format('H:i:s'));
     $dateNode->setAttribute('iso', $date->format('c'));
     $dateNode->setAttribute('rfc', $date->format('r'));
     $phpdoxNode = $dom->createElementNS(self::XMLNS, 'phpdox');
     $this->buildInfo->appendChild($phpdoxNode);
     $phpdoxNode->setAttribute('version', $this->version->getVersion());
     $phpdoxNode->setAttribute('info', $this->version->getInfoString());
     $phpdoxNode->setAttribute('generated', $this->version->getGeneratedByString());
     $phpdoxNode->setAttribute('phar', defined('PHPDOX_PHAR') ? 'yes' : 'no');
     foreach ($this->enrichers as $enricher) {
         $enricherNode = $phpdoxNode->appendElementNS(self::XMLNS, 'enricher');
         $enricherNode->setAttribute('type', $enricher);
     }
     $phpNode = $dom->createElementNS(self::XMLNS, 'php');
     $this->buildInfo->appendChild($phpNode);
     $phpNode->setAttribute('version', PHP_VERSION);
     $phpNode->setAttribute('os', PHP_OS);
     foreach (get_loaded_extensions(true) as $extension) {
         $extNode = $dom->createElementNS(self::XMLNS, 'zendextension');
         $extNode->setAttribute('name', $extension);
         $phpNode->appendChild($extNode);
     }
     foreach (get_loaded_extensions(false) as $extension) {
         $extNode = $dom->createElementNS(self::XMLNS, 'extension');
         $extNode->setAttribute('name', $extension);
         $phpNode->appendChild($extNode);
     }
     return $this->buildInfo;
 }
开发者ID:mostwanted1976,项目名称:phpdox,代码行数:41,代码来源:Build.php

示例3: setUp

 public function setUp()
 {
     $this->dom = new fDOMDocument();
     $this->frag = $this->dom->createDocumentFragment();
 }
开发者ID:klikar3,项目名称:yii2-RGraph,代码行数:5,代码来源:fDOMDocumentFragment.test.php


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