/** * Merges an array of symbols with the container. * Note: This method strips immutable variables from the symbols array before merging. * * @param $symbols * * @return $this|void */ public function merge($symbols) { $symbols = $this->normalize($symbols); # strip immutable symbols as they are, well, immutable. $symbols = $this->filter_immutables($symbols); if (!Arr::is_assoc($symbols)) { $symbols = Arr::transform_array_hash($symbols); } $this->storage = array_merge($this->storage, $symbols); return $this; }
/** * Merges an array of symbols with the container. * Note: This method strips immutable variables from the symbols array before merging. * * @param $symbols * * @return $this */ public function merge($symbols) { $symbols = $this->normalize($symbols); if (!Arr::is_assoc($symbols)) { $symbols = Arr::transform_array_hash($symbols); } $this->storage = array_merge($this->storage, $symbols); return $this; }