Exemplo n.º 1
0
 /**
  * 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;
 }
Exemplo n.º 2
0
 /**
  * Constructs a magic constant node.
  *
  * @param array $attributes Additional attributes
  */
 public function __construct(array $attributes = array())
 {
     parent::__construct(array(), $attributes);
 }
Exemplo n.º 3
0
 /**
  * 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;
 }
Exemplo n.º 4
0
 /**
  * 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);
 }
Exemplo n.º 5
0
Arquivo: Fake.php Projeto: ovr/phpsa
 /**
  * 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;
 }
Exemplo n.º 6
0
 /**
  * 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);
 }