public function offsetSet($offset, $data)
{
if ($model = $this->_model) {
$data = $model::connection()->cast($model, array($this->_pathKey => $data), array('first' => true));
}
if ($offset) {
return $this->_data[$offset] = $data;
}
return $this->_data[] = $data;
}