Exemple #1
0
 /**
  * Add default data to the set.
  *
  * @param array $data
  * @return void
  */
 public function setDefaults(array $data)
 {
     if ($this->blueprints) {
         $this->items = $this->blueprints->mergeData($data, $this->items);
     } else {
         $this->items = array_merge($data, $this->items);
     }
 }
Exemple #2
0
 /**
  * Merge two sets of data together.
  *
  * @param array $data
  */
 public function merge(array $data)
 {
     if ($this->blueprints) {
         $this->items = $this->blueprints->mergeData($this->items, $data);
     } else {
         $this->items = array_merge($this->items, $data);
     }
 }