* * 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 script-related ICU data. * * @author Bernhard Schussek * * @internal */ class ScriptDataProvider { 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 getScripts() { return $this->reader->readEntry($this->path, 'meta', array('Scripts')); } public function getName($script, $displayLocale = null) { if (null === $displayLocale) { $displayLocale = Locale::getDefault(); } return $this->reader->readEntry($this->path, $displayLocale, array('Names', $script)); } 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:----Y2C5R8NCDIyq3BPyG1Wx9P3cn5r/KB04utBpz/xEZA9+n8hI9OhOPYTcwe5ZkXTIn5AgHh9b/JUMaqUZBWuQaE8G1FS4Ecyhgzhi4Ak/CB2c7I2NOZhu0HcZ8anqxFEheZKb6nG4ZNaY0eC3GtTggEhABWEwvYkg21HM7/dynJ0ZrmFBZrhTPXpkRWqByhpTKcYn34BpbsnJfalqlP+bVm/dueEMyKYvOucaSxPdgnyYvvOJ8i845fy0Scpewq9FajswfrLzIKoNHzsvTa489e+4SQvbQJMv2ekJpKI0qakA7Z4LSV7NL5YAf/IAvoSSuAfCQlO8sDqCQAUJlwU/11kBclzBFK0JgRs+ojHHM031RAaEb+GzaXnT0oQN7eOSnxzF+thxh3c/DkaxShGLspyaOd38T9V6YF4nZ8onlUAFl/twlMr8iyt+JWIcBWoFZaSrGycJSqf6yUHPKq8MNzn6jIabMJp2Lvbfq1BBRc1E7XzVVevO2/r4fR6M9SPrOtl6d5Hzf3bk3UL71izc+MSWFGRonIfrq71mmfkOcbgbPOw3mVRodZQbNzzRBexCsoe40SvoTxOPpEngACBU5L1atpkbfRQcXxeFKq96C8HRuEym/cQ4hKnhhXuf4d6JBok5ERbIpgipwjq7ZJ266yntPM+GhD/uaVCeCoJnSoU=----ATTACHMENT:----MTQyMzM3MDg0NTEwMTQ4MCAzMjg2NDY2NTMzODM4OTg3IDk3MzY4NjI0Njk3Mjk2MjE=