original_string: public function setLoaders(array $loaders)
      {
          $this->loaders = array();
          foreach ($loaders as $type=>$loader) {
              if (!$loader instanceof ResourceLoaderInterface) {
                  throw new \InvalidArgumentException("Not a valid resource loader.");
              }
              $this->loaders[$type] = $loader;
          }
      }
code: public function setLoaders(array $loaders)
      {
          $this->loaders = array();
          foreach ($loaders as $type=>$loader) {
              if (!$loader instanceof ResourceLoaderInterface) {
                  throw new \InvalidArgumentException("Not a valid resource loader.");
              }
              $this->loaders[$type] = $loader;
          }
      }
code_tokens: public function setLoaders ( array $ loaders ) { $ this -> loaders = array ( ) ; foreach ( $ loaders as $ type => $ loader ) { if ( ! $ loader instanceof ResourceLoaderInterface ) { throw new \ InvalidArgumentException ( "Not a valid resource loader." ) ; } $ this -> loaders [ $ type ] = $ loader ; } }
docstring: sets the list of available resource loaders
  
  @param array $loaders a list of resource loaders indexed by type
docstring_tokens: sets the list of available resource loaders