public function getLoader($type, $locale)
    {
        switch ($type) {
            case 'yaml':
                return $this->newLoaderYaml($locale);
            case 'php':
                return $this->newLoaderPHP($locale);
        }
        throw new \InvalidArgumentException("Unknown loader type '$type'.");
    }
public function getLoader($type, $locale)
    {
        switch ($type) {
            case 'yaml':
                return $this->newLoaderYaml($locale);
            case 'php':
                return $this->newLoaderPHP($locale);
        }
        throw new \InvalidArgumentException("Unknown loader type '$type'.");
    }
public function getLoader ( $ type , $ locale ) { switch ( $ type ) { case 'yaml' : return $ this -> newLoaderYaml ( $ locale ) ; case 'php' : return $ this -> newLoaderPHP ( $ locale ) ; } throw new \ InvalidArgumentException ( "Unknown loader type '$type'." ) ; }
Returns a loader for a specific type and locale.

@param $type
@param $locale
@return BaseLoader|YamlLoader
@throws \InvalidArgumentException
Returns a loader for a specific type and locale .