Exemple #1
0
 /**
  * {@inheritdoc }
  */
 protected function getKey($key)
 {
     $tKey = parent::getKey($key);
     return $this->escape($tKey);
 }
Exemple #2
0
 /**
  * {@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);
 }
Exemple #3
0
 protected function pack($value)
 {
     return $this->escape(parent::pack($value));
 }
Exemple #4
0
 /**
  * @param AbstractAdapter $adapter
  * @param array $params
  * @return AbstractAdapter
  */
 private function setOption(AbstractAdapter $adapter, array $params)
 {
     foreach ($params as $k => $v) {
         $adapter->setOption($k, $v);
     }
     return $adapter;
 }