protected function addConstant(\PHPParser_Node_Stmt_ClassConst $node) { foreach ($node->consts as $const) { $constant = new ConstantReflection($const->name, $const->getLine()); $comment = $this->context->getDocBlockParser()->parse($node->getDocComment(), $this->context, $constant); $constant->setDocComment($node->getDocComment()); $constant->setShortDesc($comment->getShortDesc()); $constant->setLongDesc($comment->getLongDesc()); $this->context->getClass()->addConstant($constant); } }
private function processClassConstant(\PHPParser_Node_Stmt_ClassConst $node) { $constNode = $node->consts[0]; $const = $this->unit->addConstant($constNode->name); $const->setValue($constNode->getAttribute('originalValue')); $docComment = $node->getDocComment(); if ($docComment !== NULL) { $block = $this->dockblocParser->parse($docComment, $this->aliasMap); $const->setDocBlock($block); } }