public function accept(VisitorInterface $visitor): void
    {
        $visitor->visitBefore($this);

        foreach ($this->getChildren() as $node) {
            $node->accept($visitor);
        }

        $visitor->visitAfter($this);
    }
public function accept(VisitorInterface $visitor): void
    {
        $visitor->visitBefore($this);

        foreach ($this->getChildren() as $node) {
            $node->accept($visitor);
        }

        $visitor->visitAfter($this);
    }
public function accept ( VisitorInterface $ visitor ) : void { $ visitor -> visitBefore ( $ this ) ; foreach ( $ this -> getChildren ( ) as $ node ) { $ node -> accept ( $ visitor ) ; } $ visitor -> visitAfter ( $ this ) ; }
Accept a visitor
Accept a visitor