Пример #1
0
 /**
  * Constructor.
  * Initializes the list with an array or an iterable object.
  * @param array|Iterator the intial data. Default is null, meaning no initial data.
  * @param boolean whether the list is read-only
  * @param numeric the default priority of items without specified priorities.
  * @param integer the precision of the numeric priorities
  * @throws InvalidDataTypeException If data is not null and is neither an array nor an iterator.
  */
 public function __construct($data = null, $readOnly = false, $defaultPriority = 10, $precision = 8)
 {
     parent::__construct();
     if ($data !== null) {
         $this->copyFrom($data);
     }
     $this->setReadOnly($readOnly);
     $this->setPrecision($precision);
     $this->setDefaultPriority($defaultPriority);
 }
Пример #2
0
 /**
  * @return ListCollection
  */
 public function values()
 {
     return ListCollection::createFromArray(array_values($this->mapArray));
 }