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);
        }
    }
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);
        }
    }
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 ) ; } }
Merge the collection with another one.

@param qtism\common\collections\AbstractCollection $collection
@throws \InvalidArgumentException If $collection is not a subclass of the target of the call.
Merge the collection with another one .