4 * This file is part of the Symfony package.
6 * (c) Fabien Potencier <fabien@symfony.com>
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
12 namespace Symfony\Component\Intl\ResourceBundle\Reader
;
14 use Symfony\Component\Intl\Exception\RuntimeException
;
15 use Symfony\Component\Intl\ResourceBundle\Util\ArrayAccessibleResourceBundle
;
18 * Reads binary .res resource bundles.
20 * @author Bernhard Schussek <bschussek@gmail.com>
22 class BinaryBundleReader
extends AbstractBundleReader
implements BundleReaderInterface
27 public function read($path, $locale)
29 // Point for future extension: Modify this class so that it works also
30 // if the \ResourceBundle class is not available.
31 $bundle = new \
ResourceBundle($locale, $path);
33 if (null === $bundle) {
34 throw new RuntimeException(sprintf(
35 'Could not load the resource bundle "%s/%s.res".',
41 return new ArrayAccessibleResourceBundle($bundle);
47 protected function getFileExtension()