本文整理匯總了PHP中TheSeer\fDOM\fDOMDocument::createComment方法的典型用法代碼示例。如果您正苦於以下問題:PHP fDOMDocument::createComment方法的具體用法?PHP fDOMDocument::createComment怎麽用?PHP fDOMDocument::createComment使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類TheSeer\fDOM\fDOMDocument
的用法示例。
在下文中一共展示了fDOMDocument::createComment方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: enrichByFile
private function enrichByFile(fDOMDocument $dom)
{
if ($this->noGitAvailable) {
return;
}
$fileNode = $dom->queryOne('//phpdox:file');
if (!$fileNode) {
return;
}
/** @var fDOMElement $enrichtment */
$enrichtment = $this->getEnrichtmentContainer($dom->documentElement, 'git');
if (!$this->config->doLogProcessing()) {
$enrichtment->appendChild($dom->createComment('GitEnricher: Log processing disabled in configuration '));
return;
}
if ($this->loadFromCache($fileNode, $enrichtment)) {
return;
}
try {
$count = 0;
$limit = $this->config->getLogLimit();
$log = $this->getLogHistory($fileNode->getAttribute('realpath'));
$block = array();
foreach ($log as $line) {
if ($line == '[EOF]') {
$this->addCommit($enrichtment, $this->tokens, $block);
$block = array();
$count++;
if ($count > $limit) {
break;
}
continue;
}
$block[] = $line;
}
$this->addToCache($fileNode, $enrichtment);
} catch (GitEnricherException $e) {
$enrichtment->appendChild($dom->createComment('GitEnricher Error: ' . $e->getMessage()));
}
}