phpDocumentor\Reflection\DocBlock\Tag::getDocBlock PHP Method

getDocBlock() public method

Gets the docblock this tag belongs to.
public getDocBlock ( ) : DocBlock
return phpDocumentor\Reflection\DocBlock The docblock this tag belongs to.
    public function getDocBlock()
    {
        return $this->docblock;
    }

Usage Example

示例#1
0
 /**
  * Appends a tag at the end of the list of tags.
  *
  * @param Tag $tag The tag to add.
  *
  * @return Tag The newly added tag.
  *
  * @throws \LogicException When the tag belongs to a different DocBlock.
  */
 public function appendTag(Tag $tag)
 {
     if (null === $tag->getDocBlock()) {
         $tag->setDocBlock($this);
     }
     if ($tag->getDocBlock() === $this) {
         $this->tags[] = $tag;
     } else {
         throw new \LogicException('This tag belongs to a different DocBlock object.');
     }
     return $tag;
 }
All Usage Examples Of phpDocumentor\Reflection\DocBlock\Tag::getDocBlock