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
;
14 use Symfony\Component\Intl\Intl
;
15 use Symfony\Component\Intl\ResourceBundle\Reader\StructuredBundleReaderInterface
;
18 * Base class for {@link ResourceBundleInterface} implementations.
20 * @author Bernhard Schussek <bschussek@gmail.com>
22 abstract class AbstractBundle
implements ResourceBundleInterface
30 * @var StructuredBundleReaderInterface
35 * Creates a bundle at the given path using the given reader for reading
38 * @param string $path The path to the bundle.
39 * @param StructuredBundleReaderInterface $reader The reader for reading
42 public function __construct($path, StructuredBundleReaderInterface
$reader)
45 $this->reader
= $reader;
51 public function getLocales()
53 return $this->reader
->getLocales($this->path
);
57 * Proxy method for {@link StructuredBundleReaderInterface#read}.
59 protected function read($locale)
61 return $this->reader
->read($this->path
, $locale);
65 * Proxy method for {@link StructuredBundleReaderInterface#readEntry}.
67 protected function readEntry($locale, array $indices, $mergeFallback = false)
69 return $this->reader
->readEntry($this->path
, $locale, $indices, $mergeFallback);