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