Translation/Translator.php
public function getLoader($format)
    {
        $loader = null;
        $i = 0;
        $ids = array_keys($this->loaderIds);

        while ($i < count($ids) && null === $loader) {
            if (in_array($format, $this->loaderIds[$ids[$i]])) {
                $loader = $this->container->get($ids[$i]);
            }
            $i++;
        }

        if (!($loader instanceof LoaderInterface)) {
            throw new \RuntimeException(sprintf('No loader found for "%s" format.', $format));
        }

        return $loader;
    }
public function getLoader($format)
    {
        $loader = null;
        $i = 0;
        $ids = array_keys($this->loaderIds);

        while ($i < count($ids) && null === $loader) {
            if (in_array($format, $this->loaderIds[$ids[$i]])) {
                $loader = $this->container->get($ids[$i]);
            }
            $i++;
        }

        if (!($loader instanceof LoaderInterface)) {
            throw new \RuntimeException(sprintf('No loader found for "%s" format.', $format));
        }

        return $loader;
    }
public function getLoader ( $ format ) { $ loader = null ; $ i = 0 ; $ ids = array_keys ( $ this -> loaderIds ) ; while ( $ i < count ( $ ids ) && null === $ loader ) { if ( in_array ( $ format , $ this -> loaderIds [ $ ids [ $ i ] ] ) ) { $ loader = $ this -> container -> get ( $ ids [ $ i ] ) ; } $ i ++ ; } if ( ! ( $ loader instanceof LoaderInterface ) ) { throw new \ RuntimeException ( sprintf ( 'No loader found for "%s" format.' , $ format ) ) ; } return $ loader ; }
Returns a loader according to the given format.

@param string $format
@throws \RuntimeException
@return LoaderInterface
Returns a loader according to the given format .