Same name in other branches
  1. 5.0.x advagg_js_minify/jsminplus.inc \JSNode
  2. 6.0.x advagg_js_minify/jsminplus.inc \JSNode
  3. 7.x-1.x advagg_js_compress/jsminplus.inc \JSNode
  4. 7.x-2.x advagg_js_compress/jsminplus.inc \JSNode
  5. 8.x-2.x advagg_js_minify/jsminplus.inc \JSNode
  6. 8.x-4.x advagg_js_minify/jsminplus.inc \JSNode

Hierarchy

Expanded class hierarchy of JSNode

Fichier

advagg_js_minify/jsminplus.inc, line 1797

View source
class JSNode {
    private $type;
    private $value;
    private $lineno;
    private $start;
    private $end;
    public $treeNodes = array();
    public $funDecls = array();
    public $varDecls = array();
    public function __construct($t, $type = 0) {
        if ($token = $t->currentToken()) {
            $this->type = $type ? $type : $token->type;
            $this->value = $token->value;
            $this->lineno = $token->lineno;
            $this->start = $token->start;
            $this->end = $token->end;
        }
        else {
            $this->type = $type;
            $this->lineno = $t->lineno;
        }
        if (($numargs = func_num_args()) > 2) {
            $args = func_get_args();
            for ($i = 2; $i < $numargs; $i++) {
                $this->addNode($args[$i]);
            }
        }
    }
    // we don't want to bloat our object with all kind of specific properties, so we use overloading
    public function __set($name, $value) {
        $this->{$name} = $value;
    }
    public function __get($name) {
        if (isset($this->{$name})) {
            return $this->{$name};
        }
        return null;
    }
    public function addNode($node) {
        if ($node !== null) {
            if ($node->start < $this->start) {
                $this->start = $node->start;
            }
            if ($this->end < $node->end) {
                $this->end = $node->end;
            }
        }
        $this->treeNodes[] = $node;
    }

}

Members

Titre Trier par ordre décroissant Modifiers Object type Résumé
JSNode::$end private property
JSNode::$funDecls public property
JSNode::$lineno private property
JSNode::$start private property
JSNode::$treeNodes public property
JSNode::$type private property
JSNode::$value private property
JSNode::$varDecls public property
JSNode::addNode public function
JSNode::__construct public function
JSNode::__get public function
JSNode::__set public function