コード例 #1
0
ファイル: Dictionary.php プロジェクト: Kinetical/Kinesis
 function offsetSet($key, $value)
 {
     if ($this->isStronglyTyped() && !$value instanceof $this->_type) {
         throw new \Core\Exception('DataArray does not accept items of type: ' . get_class($value));
     }
     parent::offsetSet($key, $value);
 }
コード例 #2
0
ファイル: Cache.php プロジェクト: Kinetical/Kinesis
 function offsetSet($offset, $value)
 {
     parent::offsetSet($offset, $value);
     if ($this->Parameters->exists('hash')) {
         $offset = $this->hash($offset);
     }
     if (!is_object($value)) {
         throw new \Core\Exception('Cannot only cache objects, ' . gettype($value) . ' provided');
     }
     $this->save($offset, clone $value);
 }
コード例 #3
0
ファイル: Persistent.php プロジェクト: Kinetical/Kinesis
 public function offsetSet($offset, $value)
 {
     $this->dirty();
     return parent::offsetSet($offset, $value);
 }