Prado\Collections\TMap::mergeWith PHP Method

mergeWith() public method

Existing data in the map will be kept and overwritten if the keys are the same.
public mergeWith ( $data )
    public function mergeWith($data)
    {
        if (is_array($data) || $data instanceof Traversable) {
            foreach ($data as $key => $value) {
                $this->add($key, $value);
            }
        } else {
            if ($data !== null) {
                throw new TInvalidDataTypeException('map_data_not_iterable');
            }
        }
    }