/** * Gets the item at index $index * @param int $index * @return DataMapper */ function get($index) { // clear to ensure that the item is not duplicating data $this->object->clear(); // set the current values on the object $this->parent->_to_object($this->object, $this->result[$index]); return $this->object; }
public function clear() { parent::clear(); $this->orginal_related_values = array(); $this->changed_related_values = array(); $this->transaction_history = array(); }