예제 #1
0
파일: Memory.php 프로젝트: jeffery/Cache
 /**
  * {@inheritdoc}
  */
 public function setOption($key, $value)
 {
     switch ($key) {
         case 'limit':
             $value = (int) $value;
             $this->limit = $value;
             return true;
     }
     return parent::setOption($key, $value);
 }
예제 #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);
 }