/** * Constructs an encapsed string node. * * @param array $parts Encaps list * @param array $attributes Additional attributes */ public function __construct(array $parts, array $attributes = array()) { parent::__construct($attributes); $this->parts = $parts; }
/** * Constructs a magic constant node. * * @param array $attributes Additional attributes */ public function __construct(array $attributes = array()) { parent::__construct(array(), $attributes); }
/** * Constructs an integer number scalar node. * * @param int $value Value of the number * @param array $attributes Additional attributes */ public function __construct($value = 0, array $attributes = array()) { parent::__construct(null, $attributes); $this->value = $value; }
/** * Constructs a float number scalar node. * * @param float $value Value of the number * @param array $attributes Additional attributes */ public function __construct($value = 0.0, array $attributes = array()) { parent::__construct(array('value' => $value), $attributes); }
/** * Constructs a fake node. * * @param mixed $value Value of the Node * @param mixed $type Type of the node * @param array $attributes Additional attributes */ public function __construct($value, $type, array $attributes = array()) { parent::__construct($attributes); $this->value = $value; $this->type = $type; }
/** * Constructs an encapsed string node. * * @param array $parts Encaps list * @param array $attributes Additional attributes */ public function __construct(array $parts = array(), array $attributes = array()) { parent::__construct(array('parts' => $parts), $attributes); }