/** * Unset an item in the array * * Required by interface ArrayAccess * * @param int $offset * @return void */ public function offsetUnset($offset) { KObjectArray::offsetUnset($offset); }
/** * Overridden offsetSet() method * * All numerical array keys will be modified to start counting from zero * while literal keys won't be touched. * * @param int The offset of the item * @return object KDatabaseTRowsetAbstract */ public function offsetUnset($offset) { //We need to use array_splice instead of unset to reset the keys array_splice($this->_data, $offset, 1); return parent::offsetUnset($offset); }
/** * Remove a property * * @param string $name The property name. * @return KModelEntityAbstract */ public function removeProperty($name) { parent::offsetUnset($name); unset($this->_modified[$name]); return $this; }
/** * Remove a property * * This function will reset required properties to their default value, not required properties will be unset. * * @param string $name The property name. * @return KDatabaseRowAbstract */ public function removeProperty($name) { if ($this->isConnected()) { $column = $this->getTable()->getColumn($name); if (isset($column) && $column->required) { $this->setProperty($this->_data[$name], $column->default); } else { parent::offsetUnset($name); unset($this->_modified[$name]); } } return $this; }