本文整理匯總了PHP中phpDocumentor\Reflection\DocBlock::appendTag方法的典型用法代碼示例。如果您正苦於以下問題:PHP DocBlock::appendTag方法的具體用法?PHP DocBlock::appendTag怎麽用?PHP DocBlock::appendTag使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類phpDocumentor\Reflection\DocBlock
的用法示例。
在下文中一共展示了DocBlock::appendTag方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: normalizeDescription
/**
* Get the description and get the inherited docs.
*
*/
protected function normalizeDescription()
{
//Get the short + long description from the DocBlock
$description = $this->phpdoc->getText();
//Loop through parents/interfaces, to fill in {@inheritdoc}
if (strpos($description, '{@inheritdoc}') !== false) {
$inheritdoc = $this->getInheritDoc($this->method);
$inheritDescription = $inheritdoc->getText();
$description = str_replace('{@inheritdoc}', $inheritDescription, $description);
$this->phpdoc->setText($description);
//Add the tags that are inherited
$inheritTags = $inheritdoc->getTags();
if ($inheritTags) {
foreach ($inheritTags as $tag) {
$tag->setDocBlock();
$this->phpdoc->appendTag($tag);
}
}
}
}
示例2: mergeGeneratedTagsIntoDocBlock
/**
* @param string $existingDocBlock
* @return string
*/
protected function mergeGeneratedTagsIntoDocBlock($existingDocBlock)
{
$docBlock = new DocBlock($this->removeExistingSupportedTags($existingDocBlock));
if (!$docBlock->getText()) {
$docBlock->setText('Class ' . $this->className);
}
foreach ($this->getGeneratedTags() as $tag) {
$docBlock->appendTag($tag);
}
$serializer = new DocBlockSerializer();
$docBlock = $serializer->getDocComment($docBlock);
return $docBlock;
}