4 * This file is part of the Symfony package.
6 * (c) Fabien Potencier <fabien@symfony.com>
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
12 namespace Symfony\Component\Intl\ResourceBundle
;
15 * Default implementation of {@link RegionBundleInterface}.
17 * @author Bernhard Schussek <bschussek@gmail.com>
19 class RegionBundle
extends AbstractBundle
implements RegionBundleInterface
24 public function getCountryName($country, $locale = null)
26 if (null === $locale) {
27 $locale = \Locale
::getDefault();
30 return $this->readEntry($locale, array('Countries', $country));
36 public function getCountryNames($locale = null)
38 if (null === $locale) {
39 $locale = \Locale
::getDefault();
42 if (null === ($countries = $this->readEntry($locale, array('Countries')))) {
46 if ($countries instanceof \Traversable
) {
47 $countries = iterator_to_array($countries);