public function addResource(ResourceInterface $resource)
    {
        $key = (string) $resource;

        if (!isset($this->resources[$key])) {
            $this->resources[$key] = $resource;
        }
    }
public function addResource(ResourceInterface $resource)
    {
        $key = (string) $resource;

        if (!isset($this->resources[$key])) {
            $this->resources[$key] = $resource;
        }
    }
public function addResource ( ResourceInterface $ resource ) { $ key = ( string ) $ resource ; if ( ! isset ( $ this -> resources [ $ key ] ) ) { $ this -> resources [ $ key ] = $ resource ; } }
Adds a resource for this collection. If the resource already exists
it is not added.
Adds a resource for this collection . If the resource already exists it is not added .