You are here

public function DocBlock::hasTag in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock.php \phpDocumentor\Reflection\DocBlock::hasTag()

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

Parameters

string $name Tag name to check for.:

Return value

bool

File

vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock.php, line 404

Class

DocBlock
Parses the DocBlock for any structure.

Namespace

phpDocumentor\Reflection

Code

public function hasTag($name) {

  /** @var Tag $tag */
  foreach ($this
    ->getTags() as $tag) {
    if ($tag
      ->getName() == $name) {
      return true;
    }
  }
  return false;
}