function StaticReflectionParser::getDocComment

Same name in other branches
  1. 10 core/lib/Drupal/Component/Annotation/Doctrine/StaticReflectionParser.php \Drupal\Component\Annotation\Doctrine\StaticReflectionParser::getDocComment()
  2. 11.x core/lib/Drupal/Component/Annotation/Doctrine/StaticReflectionParser.php \Drupal\Component\Annotation\Doctrine\StaticReflectionParser::getDocComment()

Gets the doc comment.

Parameters

string $type The type: 'class', 'property' or 'method'.:

string $name The name of the property or method, not needed for 'class'.:

Return value

string The doc comment, empty string if none.

File

core/lib/Drupal/Component/Annotation/Doctrine/StaticReflectionParser.php, line 316

Class

StaticReflectionParser
Parses a file for namespaces/use/class declarations.

Namespace

Drupal\Component\Annotation\Doctrine

Code

public function getDocComment($type = 'class', $name = '') {
    $this->parse();
    return $name ? $this->docComment[$type][$name] : $this->docComment[$type];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.