Copied!
CloneableFinalInstantiable
Methods
public __construct(string $summary = '', ?phpDocumentor\Reflection\DocBlock\Description $description = NULL, array $tags = [], ?phpDocumentor\Reflection\Types\Context $context = NULL, ?phpDocumentor\Reflection\Location $location = NULL, bool $isTemplateStart = false, bool $isTemplateEnd = false)
 
  • param \DocBlock\Tag[] $tags
  • param \Types\Context $context The context in which the DocBlock occurs.
  • param \Location $location The location within the file that this DocBlock occurs in.
public getContext() : ?phpDocumentor\Reflection\Types\Context
 

Returns the current context.

public getDescription() : phpDocumentor\Reflection\DocBlock\Description
public getLocation() : ?phpDocumentor\Reflection\Location
 

Returns the current location.

public getSummary() : string
public getTags() : array
 

Returns the tags for this DocBlock.

  • return \Tag[]
public getTagsByName(string $name) : array
 

Returns an array of tags matching the given name. If no tags are found an empty array is returned.

  • param string $name String to search by.
  • return \Tag[]
public getTagsWithTypeByName(string $name) : array
 

Returns an array of tags with type matching the given name. If no tags are found an empty array is returned.

  • param string $name String to search by.
  • return \TagWithType[]
public hasTag(string $name) : bool
 

Checks if a tag of a certain type is present in this DocBlock.

  • param string $name Tag name to check for.
public isTemplateEnd() : bool
 

Returns whether this DocBlock is the end of a Template section.

  • see \self::isTemplateStart()for a more complete description of the Docblock Template functionality.
public isTemplateStart() : bool
 

Returns whether this DocBlock is the start of a Template section.

A Docblock may serve as template for a series of subsequent DocBlocks. This is indicated by a special marker (#@+) that is appended directly after the opening /** of a DocBlock.

An example of such an opening is:

/**#@+
 * My DocBlock
 * /

The description and tags (not the summary!) are copied onto all subsequent DocBlocks and also applied to all elements that follow until another DocBlock is found that contains the closing marker (#@-).

  • see \self::isTemplateEnd()for the check whether a closing marker was provided.
public removeTag(phpDocumentor\Reflection\DocBlock\Tag $tagToRemove) : void
 

Remove a tag from this DocBlock.

  • param \Tag $tagToRemove The tag to remove.
Properties
private ?phpDocumentor\Reflection\Types\Context $context = NULL
 
  • var \Types\Context|null Information about the context of this DocBlock.
private phpDocumentor\Reflection\DocBlock\Description $description
 
  • var \DocBlock\Description The actual description for this docblock.
private bool $isTemplateEnd
 
  • var bool Does this DocBlock signify the end of a DocBlock template?
private bool $isTemplateStart
 
  • var bool Is this DocBlock (the start of) a template?
private ?phpDocumentor\Reflection\Location $location = NULL
 
  • var \Location|null Information about the location of this DocBlock.
private string $summary
 
  • var string The opening line for this docblock.
private array $tags = []
 
  • var \Tag[] An array containing all the tags in this docblock; except inline.
Methods
private addTag(phpDocumentor\Reflection\DocBlock\Tag $tag) : void
 

Adds a tag to this DocBlock.

  • param \Tag $tag The tag to add.
© 2025 Bruce Wells
Search Namespaces \ Classes
Configuration