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;
        }
    }
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;
        }
    }
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 ; } }
sets the list of available resource loaders

@param array $loaders a list of resource loaders indexed by type
sets the list of available resource loaders