コード例 #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);
         }
     }
 }
コード例 #2
0
ファイル: MethodObject.php プロジェクト: rxz135cc/yii2webApp
 /**
  * @param InlineComment $InlineComment
  */
 public function addInlineComment(InlineComment $InlineComment) {
     $this->getInlineContainer()->appendChild(
         $InlineComment->asDom($this->ctx->ownerDocument)
     );
 }