Exemple #1
0
 public function accept(NodeVisitorInterface $visitor)
 {
     //        if ($visitor instanceof VisitorAbstract )  {
     if ($visitor instanceof MakesurePlaceholderValue || $visitor instanceof ApplyPlaceholderValue) {
         $visitor->enterPlaceholder($this);
     } else {
         $this->visitSecond($visitor);
     }
 }
Exemple #2
0
 public function accept(NodeVisitorInterface $visitor)
 {
     if (false !== $visitor->enterTagAttribute($this)) {
         if (false !== $visitor->enterTagAttributeList($this)) {
             $this->getValue()->accept($visitor);
         }
         $visitor->leaveTagAttributeList($this);
     }
     $visitor->leaveTagAttribute($this);
 }
 public function accept(NodeVisitorInterface $visitor)
 {
     if (false !== $visitor->enterStatement($this)) {
         if (false !== $visitor->enterStatementContent($this)) {
             if ($this->hasContent()) {
                 $this->getContent()->accept($visitor);
             }
         }
         $visitor->leaveStatementContent($this);
     }
     $visitor->leaveStatement($this);
 }
Exemple #4
0
 public function accept(NodeVisitorInterface $visitor)
 {
     if (false !== $visitor->enterFilter($this)) {
         if (false !== $visitor->enterFilterChilds($this)) {
             foreach ($this->getChilds() as $child) {
                 $child->accept($visitor);
             }
         }
         $visitor->leaveFilterChilds($this);
     }
     $visitor->leaveFilter($this);
 }
 public function accept(NodeVisitorInterface $visitor)
 {
     if (false !== $visitor->enterInterpolatedString($this)) {
         if (false !== $visitor->enterInterpolatedStringChilds($this)) {
             foreach ($this->getChilds() as $child) {
                 $child->accept($visitor);
             }
             $visitor->leaveInterpolatedStringChilds($this);
         }
         $visitor->leaveInterpolatedString($this);
     }
 }
Exemple #6
0
 public function accept(NodeVisitorInterface $visitor)
 {
     if ($visitor instanceof PhpRenderer) {
         $visitor->enterHtmlTag($this);
         if ($this->hasChilds()) {
             $visitor->indent();
             $this->visitChilds($visitor);
             $visitor->undent();
         }
     } else {
         $this->visitChilds($visitor);
     }
 }
Exemple #7
0
 public function accept(NodeVisitorInterface $visitor)
 {
     if (false !== $visitor->enterRoot($this)) {
         if (false !== $visitor->enterRootContent($this)) {
             $this->visitContent($visitor);
         }
         $visitor->leaveRootContent($this);
         if (false !== $visitor->enterRootChilds($this)) {
             $this->visitChilds($visitor);
         }
         $visitor->leaveRootChilds($this);
     }
     $visitor->leaveRoot($this);
 }
 public function accept(NodeVisitorInterface $visitor)
 {
     if (false !== $visitor->enterRun($this)) {
         if (false !== $visitor->enterRunChilds($this)) {
             $this->visitChilds($visitor);
         }
         $visitor->leaveRunChilds($this);
         if (false !== $visitor->enterRunMidblock($this)) {
             if (null !== ($block = $this->getMidblock())) {
                 $block->accept($visitor);
             }
         }
         $visitor->leaveRunMidblock($this);
     }
     $visitor->leaveRun($this);
 }
Exemple #9
0
 public function accept(NodeVisitorInterface $visitor)
 {
     if (false !== $visitor->enterObjectRefId($this)) {
         if (false !== $visitor->enterObjectRefObject($this)) {
             $this->object->accept($visitor);
         }
         $visitor->leaveObjectRefObject($this);
         if ($this->prefix) {
             if (false !== $visitor->enterObjectRefPrefix($this)) {
                 $this->prefix->accept($visitor);
             }
             $visitor->leaveObjectRefPrefix($this);
         }
     }
     $visitor->leaveObjectRefId($this);
 }
Exemple #10
0
 public function accept(NodeVisitorInterface $visitor)
 {
     if (false !== $visitor->enterTag($this)) {
         if (false !== $visitor->enterTagAttributes($this)) {
             foreach ($this->getAttributes() as $attribute) {
                 $attribute->accept($visitor);
             }
         }
         $visitor->leaveTagAttributes($this);
         if (false !== $visitor->enterTagContent($this)) {
             $this->visitContent($visitor);
         }
         $visitor->leaveTagContent($this);
         if (false !== $visitor->enterTagChilds($this)) {
             $this->visitChilds($visitor);
         }
         $visitor->leaveTagChilds($this);
     }
     $visitor->leaveTag($this);
 }
Exemple #11
0
 public function accept(NodeVisitorInterface $visitor)
 {
     // only accept visitors which implement NodeVisitor\Snip\VisitorInterface
     if (!$visitor instanceof VisitorInterface) {
         return;
     }
     if (false !== $visitor->enterPlaceholderValue($this)) {
         //            no need to visit content, because ApplyPlaceholderValue has visited
         //            if (false !== $visitor->enterPlaceholderValueContent($this)) {
         //                $this->visitContent($visitor);
         //            }
         //            $visitor->leavePlaceholderValueContent($this);
         // sometimes this is needed , see example "snip in snip 2"
         if (false !== $visitor->enterPlaceholderValueChilds($this)) {
             $this->visitChilds($visitor);
         }
         $visitor->leavePlaceholderValueChilds($this);
     }
     $visitor->leavePlaceholderValue($this);
 }
 public function accept(NodeVisitorInterface $visitor)
 {
     $visitor->enterDoctype($this);
     $visitor->leaveDoctype($this);
 }
Exemple #13
0
 public function accept(NodeVisitorInterface $visitor)
 {
     $visitor->enterText($this);
     $visitor->leaveText($this);
 }