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); }
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); }
public function offsetSet($offset, $value) { $this->dirty(); return parent::offsetSet($offset, $value); }