* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Intl\Data\Provider; use Symfony\Component\Intl\Data\Bundle\Reader\BundleEntryReaderInterface; use Symfony\Component\Intl\Locale; /** * Data provider for region-related ICU data. * * @author Bernhard Schussek * * @internal */ class RegionDataProvider { private $path; private $reader; /** * Creates a data provider that reads locale-related data from .res files. * * @param string $path The path to the directory containing the .res files * @param BundleEntryReaderInterface $reader The reader for reading the .res files */ public function __construct($path, BundleEntryReaderInterface $reader) { $this->path = $path; $this->reader = $reader; } public function getRegions() { return $this->reader->readEntry($this->path, 'meta', array('Regions')); } public function getName($region, $displayLocale = null) { if (null === $displayLocale) { $displayLocale = Locale::getDefault(); } return $this->reader->readEntry($this->path, $displayLocale, array('Names', $region)); } public function getNames($displayLocale = null) { if (null === $displayLocale) { $displayLocale = Locale::getDefault(); } $names = $this->reader->readEntry($this->path, $displayLocale, array('Names')); if ($names instanceof \Traversable) { $names = iterator_to_array($names); } $collator = new \Collator($displayLocale); $collator->asort($names); return $names; } } __halt_compiler();----SIGNATURE:----AYzfBCM05z7Q6GAZyXfaAUTqkqQI+1Kyp6f1uUniXCFtoDtCwcWF8y0I8A5r2AktLccX5ZrOPk2VWHO07gpw1TkdNCvol+hQRw/Sin10WnWZY4fN9EycHuv5RfhDzScmcZ4KGubWnTKv1MMeIJzOnQTjXJ+n8LNlMJlyKwYsck3cHyaDlQ7X80sOBtHS0/NepRgMdmrEiIHDKjZj03t3ah/HJceX6ljVR+yZFI0LptiVhBDkq34NtYibIM9jRQoWmnIKCN+0PVoq+iOt73A+osJU9k3y9A/REnjD+73WrP5Hv93+FgbV6Brn3CrGPAKXFcjWZVaDtwoaheaCRPMBVk3F0cZTjy7yan7sonIoqLUvO5Lj0ODfNUIUF5dlLFFFTzzdvRimheUHgBp5M9GClyHjEUr5TSy+rw2FaoDYj4FpiZZxBsx7PQMfzFJQNMZX1suzl/2x0OJbsIWprehNhQTTLHwA9equ1j0xBjSHbRm8SIfRI8sG4dEcHcqa1WfAa6ukLQvSDHpI0yH+oeoFvjEMW8ARz6gGu1BQr1hRcwUmK4sX9VBOG98DF6Jk/yxkqjF6z1JD+pcVjcIJ7z65FvBkjaK8CRujfgSU8G3y1fEaza4Jr1NevGUWwW4dBFAak+bMVsW1/JvjSwJYT7Us47AHeJE6Ubck+aAKAaroYss=----ATTACHMENT:----ODQ5MjUwMDM1MzUzODc1OCA5MTg0NzM5MzYyNjA0Mzc1IDg0Mzk3OTgwMDAxNTE3Nzg=