/** * {@inheritdoc} */ public function setOption($key, $value) { switch ($key) { case 'limit': $value = (int) $value; $this->limit = $value; return true; } return parent::setOption($key, $value); }
/** * {@inheritdoc } */ public function setOption($key, $value) { switch ($key) { case 'limit': $value = (int) $value; if ($value < 1) { throw new MemoryCacheException('limit cant be lower than 1'); } $this->limit = $value; return true; } return parent::setOption($key, $value); }