* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Intl\Data\Bundle\Reader; use Symfony\Component\Intl\Data\Util\RingBuffer; /** * @author Bernhard Schussek * * @internal */ class BufferedBundleReader implements BundleReaderInterface { private $reader; private $buffer; /** * Buffers a given reader. * * @param BundleReaderInterface $reader The reader to buffer * @param int $bufferSize The number of entries to store in the buffer */ public function __construct(BundleReaderInterface $reader, $bufferSize) { $this->reader = $reader; $this->buffer = new RingBuffer($bufferSize); } /** * {@inheritdoc} */ public function read($path, $locale) { $hash = $path.'//'.$locale; if (!isset($this->buffer[$hash])) { $this->buffer[$hash] = $this->reader->read($path, $locale); } return $this->buffer[$hash]; } } __halt_compiler();----SIGNATURE:----eZD4ITVPpwIDstA2Uz0iyZnmyhYnRqXC9s/SRiNzJzLnuR61NDoyjFed/fa3PyGdr1kBksiuEEhcRP4Rgfs6M/9TKilq/PjOnPFpX+TjxO5e800otspAHAjnLnerHFJZCnuxfevooEQAKG2LLhm/XQTkui7tH6gBEPm2VBbip8Bpa5o3R/Zq5kKhAkuhpyCGPhzUYvMuCMzg79l4i7uhWy7wyl8mP3mE2Cr0CdFsyi6k8QiU/YKgJqhDPHk/QKQ/r7kmiRETjGxLe93ECEtuNQAbR/r7XyzT4XvMDhkzBaaP3qy5/5jjchjpfVekndI8ItWmRvzHI0izhftQAoBaXFaKW1uha+RKUZ45vf/sqyxT1KeFS6C5ZynawGfChCH1lePvRVdFn3sg8rXrMeOuu0avO1UcHWwN9pHxzpwX2MFQloJ8BTwoG304Ww17unpRDi6ccfD390o6X0uItvc6WntomlOx878FyMWSzQwBSBnP1Wi2TjO+lZjE/eORbYqeK4M6bNvNTeGpWLo82nPSAFByxpoEtvjgq2MD4z8V077sbL75+3HCo5i/nXFSyY6rHc/3wdV4M8lIRevjiIwDKKIkIkUx9bP0gnlpwiU47xyOc2vMI20wbrzdXPfUeUYy237lFW6q1r5emoNIthp3X01VokwtT6/X24w89yIsfms=----ATTACHMENT:----OTkzODQyMTI3NjA0NjM5IDczODg5NDYyMzU2ODc5MCA3ODA0OTI5NDgyODA0NDU5