/** * Use the association to set the item to the colleciton * @param integer $offset * @param mixed $item */ public function offsetSet($offset, $item) { parent::offsetSet($offset, $item); if ($item instanceof Jam_Model) { $this->association()->item_set($this->parent(), $item); } }