public function offsetSet($offset, $value)
{
if (is_null($offset)) {
$this->_parts[] = $value;
$this->_status |= self::STATUS_REINDEX;
} elseif ($part = $this[$offset]) {
if ($part->parent === $this) {
if (($k = array_search($part, $this->_parts, true)) !== false) {
$value->setMimeId($part->getMimeId());
$this->_parts[$k] = $value;
}
} else {
$this->parent[$offset] = $value;
}
}
}