original_string: 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);
                  }
              }
          }
      }
code: 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);
                  }
              }
          }
      }
code_tokens: 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 ) ; } } } }
docstring: Sets the resource collector.
  
  @param ResourceCollectorInterface $collector The collector.
docstring_tokens: Sets the resource collector .