/** * Parse the docblock * * @return void */ protected function reflect() { if ($this->isReflected) { return; } $docComment = $this->docComment; // localize variable // First remove doc block line starters $docComment = preg_replace('#[ \t]*(?:\/\*\*|\*\/|\*)?[ ]{0,1}(.*)?#', '$1', $docComment); $docComment = ltrim($docComment, "\r\n"); // @todo should be changed to remove first and last empty line $this->cleanDocComment = $docComment; $scanner = new DocBlockScanner($docComment, $this->annotationManager); $this->shortDescription = $scanner->getShortDescription(); $this->longDescription = $scanner->getLongDescription(); $this->tags = $scanner->getTags(); if ($this->annotationManager) { $this->annotations = $scanner->getAnnotations(); } $this->isReflected = true; }