/** * Constructs a new escaping iteratoror using the escaping method and value supplied. * * @param string $escapingMethod The escaping method to use * @param \Traversable $value The iterator to escape */ public function __construct($escapingMethod, \Traversable $value) { // Set the original value for __call(). Set our own iterator because passing // it to IteratorIterator will lose any other method calls. parent::__construct($escapingMethod, $value); $this->iterator = new \IteratorIterator($value); }
/** * Constructor * * @param ObjectConfig $config A ObjectConfig object with optional configuration options * @throws \RuntimeException If the APC PHP extension is not enabled or available */ public function __construct(ObjectConfig $config) { parent::__construct($config); if (!static::isSupported()) { throw new \RuntimeException('Unable to use TranslatorCache. APC is not enabled.'); } $this->__loaded = array(); }