Sha256: d29c99e483770bd703f2c051137e1825c268c1eaf4ff7e89d155a93ae0b9fef9

Contents?: true

Size: 1.05 KB

Versions: 10

Compression:

Stored size: 1.05 KB

Contents

<?php

namespace MtHaml\Node;

use MtHaml\NodeVisitor\NodeVisitorInterface;

class ObjectRefClass extends NodeAbstract
{
    protected $object;
    protected $prefix;

    public function __construct($position, NodeAbstract $object, NodeAbstract $prefix = null)
    {
        parent::__construct($position);
        $this->object = $object;
        $this->prefix = $prefix;
    }

    public function getNodeName()
    {
        return 'object_ref_class';
    }

    public function accept(NodeVisitorInterface $visitor)
    {
        if (false !== $visitor->enterObjectRefClass($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->leaveObjectRefClass($this);
    }
}

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
guard-mthaml-0.4.0 vendor/mthaml/mthaml/lib/MtHaml/Node/ObjectRefClass.php
guard-mthaml-0.3.1 vendor/mthaml/mthaml/lib/MtHaml/Node/ObjectRefClass.php
guard-mthaml-0.3.0 vendor/mthaml/mthaml/lib/MtHaml/Node/ObjectRefClass.php
guard-mthaml-0.2.5 vendor/mthaml/mthaml/lib/MtHaml/Node/ObjectRefClass.php
guard-mthaml-0.2.4 vendor/mthaml/mthaml/lib/MtHaml/Node/ObjectRefClass.php
guard-mthaml-0.2.3 vendor/mthaml/mthaml/lib/MtHaml/Node/ObjectRefClass.php
guard-mthaml-0.2.2 vendor/mthaml/mthaml/lib/MtHaml/Node/ObjectRefClass.php
guard-mthaml-0.2.1 vendor/mthaml/mthaml/lib/MtHaml/Node/ObjectRefClass.php
guard-mthaml-0.2.0 vendor/mthaml/mthaml/lib/MtHaml/Node/ObjectRefClass.php
guard-mthaml-0.1.0 vendor/mthaml/mthaml/lib/MtHaml/Node/ObjectRefClass.php