TheSeer\phpDox\Collector\MethodObject::addInlineComment PHP Метод

addInlineComment() публичный Метод

public addInlineComment ( TheSeer\phpDox\Collector\InlineComment $InlineComment )
$InlineComment TheSeer\phpDox\Collector\InlineComment
    public function addInlineComment(InlineComment $InlineComment)
    {
        $this->getInlineContainer()->appendChild($InlineComment->asDom($this->ctx->ownerDocument));
    }

Usage Example

Пример #1
0
 private function processInlineComments(MethodObject $method, array $stmts) {
     foreach($stmts as $stmt) {
         if ($stmt->hasAttribute('comments')) {
             foreach($stmt->getAttribute('comments') as $comment) {
                 $inline = new InlineComment($comment->getLine(), $comment->getText());
                 if ($inline->getCount() != 0) {
                     $method->addInlineComment($inline);
                 }
             }
         }
         if ($stmt->stmts) {
             $this->processInlineComments($method, $stmt->stmts);
         }
     }
 }