/** * Returns the parsed DocBlock. * * @return \phpDocumentor\Reflection\DocBlock|null */ public function getDocBlock() { $doc_block = null; if ((string) $this->node->getDocComment()) { $doc_block = new \phpDocumentor\Reflection\DocBlock((string) $this->node->getDocComment()); $doc_block->line_number = $this->node->getLine(); } $this->dispatch('reflection.docblock-extraction.post', array('docblock' => $doc_block)); return $doc_block; }
/** * Returns the parsed DocBlock. * * @return \phpDocumentor\Reflection\DocBlock|null */ public function getDocBlock() { $doc_block = null; if ($comment = $this->node->getDocComment()) { try { $doc_block = new \phpDocumentor\Reflection\DocBlock((string) $comment, $this->getNamespace(), $this->getNamespaceAliases()); $doc_block->line_number = $comment->getLine(); } catch (\Exception $e) { $this->log($e->getMessage(), 2); } } \phpDocumentor\Event\Dispatcher::getInstance()->dispatch('reflection.docblock-extraction.post', \phpDocumentor\Reflection\Event\PostDocBlockExtractionEvent::createInstance($this)->setDocblock($doc_block)); return $doc_block; }