merge.

@param FeedInterface $feed
423400
public function merge(FeedInterface $feed)
    {
        foreach ($feed as $post) {
            $this->addPost($post);
        }

        return $this;
    }
146879
protected function merge($data, $index, $merge)
    {
        if (array_values($data) === $data) {
            return array_merge(
                array_merge(array_slice($data, 0, $index, true), $merge),
                $this->filter(array_slice($data, $index + 1, null, true))
            );
        }

        return array_slice($data, 0, $index, true) +
            $merge +
            $this->filter(array_slice($data, $index + 1, null, true));
    }
754158
public function merge(array $attributes)
    {
        foreach ($attributes as $name => $value) {
            $this->add($name, $value);
        }
    }
750524
public function mergeLog(Log $log)
	{
		/** @var Release $release */
		foreach ($log as $release)
		{
			$name = $release->getName();
			if ($this->hasRelease($name))
			{
				// if it does exist then merge the changes
				$this->mergeRelease($log, $name);
			}
			else
			{
				// If the release does not exist add it
				$this->addRelease($release);
			}
		}
	}
41962
public function mergeInto(RootPackageInterface $root, PluginState $state)
    {
        $this->prependRepositories($root);

        $this->mergeRequires('require', $root, $state);

        $this->mergePackageLinks('conflict', $root);
        $this->mergePackageLinks('replace', $root);
        $this->mergePackageLinks('provide', $root);

        $this->mergeSuggests($root);

        $this->mergeAutoload('autoload', $root);

        $this->mergeExtra($root, $state);

        $this->mergeScripts($root, $state);

        if ($state->isDevMode()) {
            $this->mergeDevInto($root, $state);
        } else {
            $this->mergeReferences($root);
        }
    }
857917
public function merge()
    {
        // TODO: verify analysis phase run
        foreach ($this->dataFiles as $replicate => $fractions) {
            $firstFile = current($fractions);
            // Write header
            $this->writeHeader($firstFile['path'], $this->spectrumCount[$replicate], $this->outputFiles[$replicate]);

            // Resets vars
            $this->spectrumIdRef = array();
            $this->timeOffset = 0;
            $this->indexOffset = 0;
            $this->idOffset = 0;

            foreach ($fractions as $fractionIndex => $file) {
                $this->writeSpectrum($file['path'], $this->outputFiles[$replicate],
                    $this->fractionOffsets[$fractionIndex]);
            }

            $this->writeFooter($firstFile['path'], $this->outputFiles[$replicate]);
        }
    }
1215327
public function merge($collection)
    {
        if (is_object($collection) && $collection->count() > 0) {
            $this->collection = array_merge($this->collection, $collection->collection);
        }
    }
167364
protected function _merge(DefinitionManager $current, DefinitionManager $new)
    {
        /** @var DefinitionInterface $definition */
        foreach ($new as $definition) {
            if (!$current->has($definition->getName())) {
                $current->add($definition);
            }
        }
    }
91473
protected function mergeStorage(StorageInterface $storage)
    {
        foreach ($storage->all() as $id => $object) {
            $this->stack->getScope('global')->add($object);
        }
    }
1256441
public function addFeed($channel, $feed)
    {
        if (!filter_var($feed, FILTER_VALIDATE_URL)) {
            throw new LogicException('You tried to add a invalid url.');
        }
        $this->feeds[$channel][] = $feed;
    }
1063828
public function merge(array $data)
    {
        if (array_key_exists('_id', $data)) {
            throw new \Exception('Property "_id" is read-only');
        } else {
            $this->import($data);

            parent::merge($data);
        }
    }
1014651
public function merge(array $config, $type)
    {
        foreach ($config as $key => $val) {
            $this->set($key, $val, $type);
        }
    }
1160976
public function merge(Horde_Imap_Client_Data_Fetch $data)
    {
        $this->_data = array_replace_recursive(
            $this->_data,
            $data->getRawData()
        );
    }
1127735
public function setFeed(\Newscoop\IngestPluginBundle\Entity\Feed $feed)
    {
        $this->feed = $feed;

        return $this;
    }
491797
@Override
  public void merge(MergeState mergeState) throws IOException {
    final List<Fields> fields = new ArrayList<>();
    final List<ReaderSlice> slices = new ArrayList<>();

    int docBase = 0;

    for (int readerIndex = 0; readerIndex < mergeState.fieldsProducers.length; readerIndex++) {
      final FieldsProducer f = mergeState.fieldsProducers[readerIndex];

      final int maxDoc = mergeState.maxDocs[readerIndex];
      f.checkIntegrity();
      slices.add(new ReaderSlice(docBase, maxDoc, readerIndex));
      fields.add(f);
      docBase += maxDoc;
    }

    Fields mergedFields = new MappedMultiFields(mergeState,
        new MultiFields(fields.toArray(Fields.EMPTY_ARRAY),
            slices.toArray(ReaderSlice.EMPTY_ARRAY)));
    write(mergedFields);
  }
431230
protected static function _merge($stack, &$return)
    {
        while (!empty($stack)) {
            foreach ($stack as $curKey => &$curMerge) {
                foreach ($curMerge[0] as $key => &$val) {
                    $isArray = is_array($curMerge[1]);
                    if ($isArray && !empty($curMerge[1][$key]) && (array)$curMerge[1][$key] === $curMerge[1][$key] && (array)$val === $val) {
                        // Recurse into the current merge data as it is an array.
                        $stack[] = [&$val, &$curMerge[1][$key]];
                    } elseif ((int)$key === $key && $isArray && isset($curMerge[1][$key])) {
                        $curMerge[1][] = $val;
                    } else {
                        $curMerge[1][$key] = $val;
                    }
                }
                unset($stack[$curKey]);
            }
            unset($curMerge);
        }
    }
1203844
public function merge(AbstractCollection $collection)
    {
        if (is_subclass_of($collection, get_class($this)) === true || get_class($collection) === get_class($this)) {
            $newData = array_merge($this->dataPlaceHolder, $collection->getDataPlaceHolder());
            $this->dataPlaceHolder = $newData;
        } else {
            $msg = "Only collections with compliant types can be merged ";
            $msg.= "('" . get_class($this) . "' vs '" . get_class($collection) . "').";
            throw new InvalidArgumentException($msg);
        }
    }