* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Intl\Data\Bundle\Reader; use Symfony\Component\Intl\Exception\ResourceBundleNotFoundException; use Symfony\Component\Intl\Data\Util\ArrayAccessibleResourceBundle; /** * Reads binary .res resource bundles. * * @author Bernhard Schussek * * @internal */ class IntlBundleReader implements BundleReaderInterface { /** * {@inheritdoc} */ public function read($path, $locale) { // Point for future extension: Modify this class so that it works also // if the \ResourceBundle class is not available. try { // Never enable fallback. We want to know if a bundle cannot be found $bundle = new \ResourceBundle($locale, $path, false); } catch (\Exception $e) { // HHVM compatibility: constructor throws on invalid resource $bundle = null; } // The bundle is NULL if the path does not look like a resource bundle // (i.e. contain a bunch of *.res files) if (null === $bundle) { throw new ResourceBundleNotFoundException(sprintf( 'The resource bundle "%s/%s.res" could not be found.', $path, $locale )); } // Other possible errors are U_USING_FALLBACK_WARNING and U_ZERO_ERROR, // which are OK for us. return new ArrayAccessibleResourceBundle($bundle); } } __halt_compiler();----SIGNATURE:----Hyv7A7daufT0KOM5CZeH4tYsIz3cRbg0doSrwYRWU3CgZRiUCaS2p08mpwJQ7ANxiDcpGkkteYHuwYaUsqgm6625/j4dFy10Ze+gC016Vs8ia5C4PbC1+aTYkogYSRb9b00M3ZMMUNsNOoyFp+ZpWF521DX7Rs69BoGHxGBGP2WI7Ike8C1PYpgbNHwg6ddy+rXQZWPR24M7SVq2p6hnH6sNQzZbW0+sFv8O/7DnFpWo43kWI0nMBWe6p3UTYg2+MD9slDpX/GtNyGberakC1WSNFy+KFfuNBhJFeigoKAgyZOQvyRdE8M09AWwaF4YVnq9C8A8c1hgiRTQIFCoJUDJMPjC7Japyd1DzrxGYzRIZKbN+VhL5pDhG/lvxAqMc8gMEawO1ZklPaCmiNgyQuzaS0NlJ3c4NOy5oRReSG/P6NALa2Gor2MHoECK2i5YhxGkTApeov0HOgaFcdrltJGevWxWJhvIuHMMgABDgFg8FtYvkxzm4A5uinRlu3aUN97KvTwHBv2RdeLjREyMWmPuTS7NiY5TKerq7z5TdkQp3dXxirN7vABFkn27XHpzfApopJaLIDj6nP2ZNozqWyr2FLjU2gQSqZJAnryDeEmtctdmtKREoyiqKY+bNcT7GifTH0RGfCwmQG/Oe10Fnl836CZT1LCdvJiAPvaTfEXY=----ATTACHMENT:----OTYwNjE1NTk1MjA2MDA4NyAxMTM2NTI2MzY5NzI4NDIxIDQzNjEyMzM3NDIyOTQ4NDc=