* * 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\Locale; use Symfony\Component\Intl\Data\Bundle\Reader\BundleEntryReaderInterface; /** * Data provider for language-related ICU data. * * @author Bernhard Schussek * * @internal */ class LanguageDataProvider { 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 getLanguages() { return $this->reader->readEntry($this->path, 'meta', array('Languages')); } public function getAliases() { return $this->reader->readEntry($this->path, 'root', array('Aliases')); } public function getName($language, $displayLocale = null) { if (null === $displayLocale) { $displayLocale = Locale::getDefault(); } return $this->reader->readEntry($this->path, $displayLocale, array('Names', $language)); } public function getNames($displayLocale = null) { if (null === $displayLocale) { $displayLocale = Locale::getDefault(); } $languages = $this->reader->readEntry($this->path, $displayLocale, array('Names')); if ($languages instanceof \Traversable) { $languages = iterator_to_array($languages); } $collator = new \Collator($displayLocale); $collator->asort($languages); return $languages; } public function getAlpha3Code($language) { return $this->reader->readEntry($this->path, 'meta', array('Alpha2ToAlpha3', $language)); } } __halt_compiler();----SIGNATURE:----O7Ny6we1bRkQs7CqE11tMG2fjlHct8u5fu4FnEyqndnVb2WVVXlbyrCzXjhTgxp9y9z56AxHdumfxSkjWGSq0TCSMxgNHMRoEdMIXeXlZNls5txbfqH5C5MuQR/i3kwfoKd8RmODcfExKaMKHRTFsMyId9lZ4HRIsray5bXxMH04u/awxIIxBwXdmEbqtX6dj9bbL1EFkg1zEx+J2B/ZzfBw03dtrqeYIeoGYQa1nQqPsyqY8J2w02xpOwWcETx3/IlPioRujaL0TPWvmRfdYdvCGBdS0AV1xKD4NJbp/9k1HwZoZffnNMrxaDP+dk6Iv7Tl9KH7wrbNkPb9oWMlSs2nuEo4GUq+dPoBkli9KPEc5ShIOpeAXlVJxJk8btcPa4kDEKHfFmpqx4WZwSY6xc7kgwWFPvdi4ijBvA33979Zguj4wkJDqljz7huSe14NXm/wPt231jIejQ1/9RIM7eTVCsDdIrCkrHPWvBZ2HkCupFwSOmE8vlgk6kUMGAyTxxlhipijtmMI8sPcUpuMQF34iWFmhBH4i9ec6ZvmcU3MfAIp2XT+pRPaiVGpi6xMUQ6vU32R4G/ZAQUpD7XLk9/SxXHf+oqTiNVzcUZovOh6rxQnyDgtUaeQ1pb1UqQpi3BsmCQ3ePfN73k/Y54B+IgMfMk7D4EV4fY2UAwHzeo=----ATTACHMENT:----NjMzNjQ4MTg0NDcyNDgzNCA5MTU2NTAzNjExMjM1OTk4IDI3MjUwNTIxNjMxMDQ0Njk=