* * 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:----WIH4iKYuj4JQqVZzHb4TuKOmbTH6fCL4lOMQIBYTAyESlapIflGhukUniznmbeXQQ66ULktfwZZRNiSpozXZBIqQTfcZAOGs1JVArnyco7Rogj7uPhPIE6WjhxuEuB6j2flVNrlZbc68UgI5tG49fAUi19WxfIo/Tu3tBHUDvs/xYH0YYdPj+uTlS/SLMkFo7qh+XtcMuLVSxahkP1OSe+ygq9Mje1ULY4E1natzUgQJ4URFsHPvnGhJ2SsWu1LV935tA6DN2AYh8rUaJzViQuzfZaEYT1Z68auTqubQ32RPiauMRApcMltizIoVgNenMxvMPgsLoz4Eir5grfwXWQ48YKQynp9TzAOwDPR8iRrFvrqfpHnHjTldTytXE9P3EHmDhrQ7qDlmvYRHcXjlDN124JHnNAAETKLuhpMFkAnePllj2nOwnFzFcI/smTlK9ssZYWaYpIFI99pns55u0lUmz1xaq02WfBPk7LYLj6jyXIwPfBgfM+vVWW3SOiUaWk1qZZxfxsqUe6HrsObPSCvVAeQMn8+CC6EFMGNZNI7cOFDUeRm31G0bFXyXI99SreA3wY5LlbFIMbB5vWZQAWCKTCh5rYen+wsy0kv8F9/yTdY9E/K5OW7whaG4SgV4hNJlrUmgP1yJEjdQTFemNicEc7KP4MKNys2wxx5mbC8=----ATTACHMENT:----NTgyMjQ3Njg0MzIwNDA1MSA3MjQ5ODc1NTkxMjI3ODkzIDcwNzQ4ODY0ODQ5NjU1OTg=