You are here

public function JSNode::__construct in Advanced CSS/JS Aggregation 7.2

Same name and namespace in other branches
  1. 8.4 advagg_js_minify/jsminplus.inc \JSNode::__construct()
  2. 8.2 advagg_js_minify/jsminplus.inc \JSNode::__construct()
  3. 8.3 advagg_js_minify/jsminplus.inc \JSNode::__construct()
  4. 6 advagg_js_compress/jsminplus.inc \JSNode::__construct()
  5. 7 advagg_js_compress/jsminplus.inc \JSNode::__construct()

File

advagg_js_compress/jsminplus.inc, line 1808
JSMinPlus version 1.4

Class

JSNode

Code

public function __construct($t, $type = 0) {
  $args = func_get_args();
  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) {
    for ($i = 2; $i < $numargs; $i++) {
      $this
        ->addNode($args[$i]);
    }
  }
}