public function offsetSet($offset, $value)
{
if (is_null($offset)) {
$this->add($value);
} else {
if ($this->offsetExists($offset)) {
$this->remove($offset);
}
$this->add($value);
}
}