src/CSDT/CollectionsBundle/TraitCollection/SubsetableCollectionTrait.php
protected function fromArray(
        array $source,
        ContainerCollectionInterface $target
    ) {
        foreach ($source as $key => $value) {
            $target->set($key, $value);
        }
    }
protected function fromArray(
        array $source,
        ContainerCollectionInterface $target
    ) {
        foreach ($source as $key => $value) {
            $target->set($key, $value);
        }
    }
From array

This method hydrate a ContainerCollectionInterface
from the values and key contained into an array

@param array                        $source The source array
@param ContainerCollectionInterface $target The target collection

@return void