Exemple #1
0
 public function __construct(array $elements = [])
 {
     parent::__construct($elements);
     foreach ($this->elements as $element) {
         $this->hashes[spl_object_hash($element)] = true;
     }
 }
Exemple #2
0
 /**
  * Constructs a collection object of the specified type,
  * optionally with the specified data
  *
  * @param string $collectionType
  * @param array $data
  */
 public function __construct($collectionType, array $data = [])
 {
     $this->collectionType = $collectionType;
     parent::__construct($data);
 }
Exemple #3
0
 /**
  * Set the value of an array native type
  *
  * @param array $value
  */
 public function __construct($value)
 {
     $this->_type = self::XMLRPC_TYPE_ARRAY;
     parent::__construct($value);
 }
 /**
  * Set the value of a struct native type
  *
  * @param array $value
  */
 public function __construct($value)
 {
     $this->type = self::XMLRPC_TYPE_STRUCT;
     parent::__construct($value);
 }
Exemple #5
0
 /**
  * @param array $values
  */
 public function __construct($values)
 {
     parent::__construct(array_fill_keys($values, true));
 }
 /**
  * ArrayCollection constructor.
  *
  * @param array $aValues
  */
 public function __construct(array $aValues = array())
 {
     parent::__construct($aValues);
     $this->resetKeys();
 }
Exemple #7
0
 /**
  * @inheritdoc
  */
 public function __construct(array $data = [])
 {
     parent::__construct(array_values(array_unique($data)));
 }
 protected function __construct()
 {
     parent::__construct();
 }
 /**
  * AbstractConsulConfig constructor.
  * @param array $data
  */
 public function __construct(array $data = array())
 {
     $this->_definition = $this->getDefinition();
     parent::__construct($data + $this->_definition);
 }
Exemple #10
0
 /**
  * Snapshots collection after creation.
  *
  * @param array $elements
  */
 public function __construct(array $elements = [])
 {
     parent::__construct($elements);
     $this->snapshot();
 }
Exemple #11
0
 /**
  * @param array $values
  */
 public function __construct($values)
 {
     parent::__construct(array_values($values));
 }
Exemple #12
0
 /**
  * Initializes ListArray numerically reindexing provided elements.
  *
  * @param array $elements
  */
 public function __construct(array $elements = [])
 {
     parent::__construct(array_values($elements));
 }