public function setCollector(ResourceCollectorInterface $collector)
    {
        $this->collector = $collector;

        if ($this->loader) {
            if ($this->loader instanceof ResourceAwareInterface) {
                $this->loader->setResourceCollector($collector);
            }

            if ($this->loader instanceof DelegatingLoader) {
                $resolver = $this->loader->getResolver();

                if ($resolver instanceof ResourceAwareInterface) {
                    $resolver->setResourceCollector($collector);
                }
            }
        }
    }
public function setCollector(ResourceCollectorInterface $collector)
    {
        $this->collector = $collector;

        if ($this->loader) {
            if ($this->loader instanceof ResourceAwareInterface) {
                $this->loader->setResourceCollector($collector);
            }

            if ($this->loader instanceof DelegatingLoader) {
                $resolver = $this->loader->getResolver();

                if ($resolver instanceof ResourceAwareInterface) {
                    $resolver->setResourceCollector($collector);
                }
            }
        }
    }
public function setCollector ( ResourceCollectorInterface $ collector ) { $ this -> collector = $ collector ; if ( $ this -> loader ) { if ( $ this -> loader instanceof ResourceAwareInterface ) { $ this -> loader -> setResourceCollector ( $ collector ) ; } if ( $ this -> loader instanceof DelegatingLoader ) { $ resolver = $ this -> loader -> getResolver ( ) ; if ( $ resolver instanceof ResourceAwareInterface ) { $ resolver -> setResourceCollector ( $ collector ) ; } } } }
Sets the resource collector.

@param ResourceCollectorInterface $collector The collector.
Sets the resource collector .