Ejemplo n.º 1
0
 protected function addClassOrInterface($node)
 {
     $class = new ClassReflection((string) $node->namespacedName, $node->getLine());
     $class->setModifiers($node->type);
     $class->setNamespace($this->context->getNamespace());
     $class->setAliases($this->context->getAliases());
     $class->setHash($this->context->getHash());
     $class->setFile($this->context->getFile());
     if ($this->context->getFilter()->acceptClass($class)) {
         $comment = $this->context->getDocBlockParser()->parse($node->getDocComment(), $this->context, $class);
         $class->setDocComment($node->getDocComment());
         $class->setShortDesc($comment->getShortDesc());
         $class->setLongDesc($comment->getLongDesc());
         if ($errors = $comment->getErrors()) {
             $this->context->addErrors((string) $class, $node->getLine(), $errors);
         } else {
             $class->setTags($comment->getOtherTags());
         }
         $this->context->enterClass($class);
     }
     return $class;
 }