getParsedContents() public method

Returns the parsed text of this description.
public getParsedContents ( ) : array
return array An array of strings and tag objects, in the order they occur within the description.
Ejemplo n.º 1
0
 private function buildDescription($docBlock, $content = null)
 {
     if ($content === null) {
         $content = $docBlock->getText();
     }
     $desc = new Description($content, $docBlock);
     $parsedContents = $desc->getParsedContents();
     if (count($parsedContents) > 1) {
         // convert inline {@see} tag to custom type link
         foreach ($parsedContents as &$part) {
             if ($part instanceof Seetag) {
                 $reference = $part->getReference();
                 if (substr_compare($reference, 'Google\\Cloud', 0, 12) === 0) {
                     $part = $this->buildLink($reference);
                 }
             }
         }
         $content = implode('', $parsedContents);
     }
     $content = str_ireplace('[optional]', '', $content);
     return $this->markdown->parse($content);
 }
Ejemplo n.º 2
0
 /**
  * Gets the parsed text of this description.
  *
  * @return array An array of strings and tag objects, in the order they
  *     occur within the description.
  */
 public function getParsedDescription()
 {
     if (null === $this->parsedDescription) {
         $description = new Description($this->description, $this->docblock);
         $this->parsedDescription = $description->getParsedContents();
     }
     return $this->parsedDescription;
 }