* * 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:----TFb9anHUG0oExpo84S/vdZSESAbMgWaX1zPb6AZvnF+h4DKEdgwJ28WT4ZS5JYz+onSNFtyfVH4xIFWQ2IsuD9vr43eXlsa2HcpHvGtAC0vaaP8T/qwFhUAQsZUMMyU8RwSnlWLEN7MY2hsNQAGCgr3n9IvxI9K64WvKmUiNs0B9uxaMproPN2bXXLNsiQc154Z8hblz0KqsvjEt+S7DVowPw7aZZVKxNT275daIrFdJlBLLqenaOrxnYv5M9jfz2T1jwjI0DEtWLYYjJt8EzFIk6zmmMcnSeGT2mIep5qaOeq/M/RXXu74n9CyRX5N2fXux3T55gI32QCzpOaqDtoh6vNhhrXhXTS6GpmGPrsdypenjX758xbMJCCRej7yz6DRqVy8cYBBC8W0DJPa9JepZyzR0BAUlO8jGN+IsocTJXSrY1/arfspEQoyF/ubN8cK9k84H/Wxi0KDhoOkgomNF2VDMkgNLM3VSgZuiMcmQSsOQnoLz+DYWKfJXlg8riD04dbFUlf9CTAxc5nrw0LVmKaS9jCevCCqORNKhLpy0ft+j9fa0ULL0jkj4iWbRkvM+O9z8ifiFemTqkxBApECjrDBjNCADvsMsXRA0YxnVJ4mcGonOJ+53UNkjeuSRB3fZzgaVxh0eJfIRYVjXAISoi7/zRf/0rfa74K//lw4=----ATTACHMENT:----NjM2Mzc0NDM2MjI1ODYzMCAzNDQxOTczODIzNTUxMDAyIDYwNDc0MzIyNzY5MzY2MTU=