You are here

public function DocBlock::getText in Zircon Profile 8.0

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

Gets the text portion of the doc block.

Gets the text portion (short and long description combined) of the doc block.

Return value

string The text portion of the doc block.

File

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

Class

DocBlock
Parses the DocBlock for any structure.

Namespace

phpDocumentor\Reflection

Code

public function getText() {
  $short = $this
    ->getShortDescription();
  $long = $this
    ->getLongDescription()
    ->getContents();
  if ($long) {
    return "{$short}\n\n{$long}";
  }
  else {
    return $short;
  }
}