public function addCollection(UriCollection $collection)
    {
        // we need to remove all uris with the same names first because just replacing them
        // would not place the new uri at the end of the merged array
        foreach ($collection->all() as $name => $uri) {
            unset($this->uris[$name]);
            $this->uris[$name] = $uri;
        }

        $this->resources = array_merge($this->resources, $collection->getResources());
    }