當前位置: 首頁>>代碼示例>>PHP>>正文


PHP DocBlock::appendTag方法代碼示例

本文整理匯總了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);
             }
         }
     }
 }
開發者ID:enisyalcin,項目名稱:laravel,代碼行數:24,代碼來源:Method.php

示例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;
 }
開發者ID:axyr,項目名稱:silverstripe-ideannotator,代碼行數:17,代碼來源:DocBlockGenerator.php


注:本文中的phpDocumentor\Reflection\DocBlock::appendTag方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。