setDocBlock() public method

public setDocBlock ( DocBlock $docblock )
$docblock TheSeer\phpDox\DocBlock\DocBlock
Esempio n. 1
0
 /**
  * @param $node
  */
 private function processUnit($node)
 {
     $this->unit->setStartLine($node->getAttribute('startLine'));
     $this->unit->setEndLine($node->getAttribute('endLine'));
     if ($node instanceof NodeType\Class_) {
         $this->unit->setAbstract($node->isAbstract());
         $this->unit->setFinal($node->isFinal());
     } else {
         $this->unit->setAbstract(FALSE);
         $this->unit->setFinal(FALSE);
     }
     $docComment = $node->getDocComment();
     if ($docComment !== NULL) {
         $block = $this->docBlockParser->parse($docComment, $this->aliasMap);
         $this->unit->setDocBlock($block);
     }
     if ($node->getType() != 'Stmt_Trait' && $node->extends != NULL) {
         if (is_array($node->extends)) {
             foreach ($node->extends as $extends) {
                 $this->unit->addExtends(join('\\', $extends->parts));
             }
         } else {
             $this->unit->addExtends(join('\\', $node->extends->parts));
         }
     }
     if ($node->getType() == 'Stmt_Class') {
         foreach ($node->implements as $implements) {
             $this->unit->addImplements(join('\\', $implements->parts));
         }
     }
 }