Example #1
0
 /**
  * Constructs an object with an array <i>$other</i>.
  * 
  * @param array $other
  */
 public function __construct(array $other = array())
 {
     parent::__construct();
     if (count($other) > 0) {
         $this->map = array_merge($this->map, $other);
     }
 }
Example #2
0
 /**
  * Constructs a list with the values of <i>$list</i>.
  *
  * @param array|MList $list
  * @param string|null $type
  */
 public function __construct(array $list = array(), $type = null)
 {
     parent::__construct($type);
     foreach ($list as $item) {
         $this->append($item);
     }
 }
Example #3
0
 public function __construct(array $array = array(), $type = null)
 {
     parent::__construct($type);
     $this->vector = array_values($array);
 }
Example #4
0
 /**
  * Constructs a list with the values of <i>$list</i>.
  *
  * @param array|MList $list
  * @param string|null $type
  */
 public function __construct(array $list = array(), $type = null)
 {
     parent::__construct($type);
     $this->list = array_values($list);
 }