/** * Ignore specific key * @param string $key * @return boolean */ protected function ignore($key) { if ($key == Entity::DISTANCE || $key == Entity::TIME_IN_SECONDS) { // TODO: needed if equipment is set if ($this->OldObject == null && false) { throw new \RuntimeException('For an update of distance or duration the old object has to be set.'); } } return parent::ignore($key); }
/** * Ignore specific key * @param type $key * @return boolean */ protected function ignore($key) { if ($key == Object::DISTANCE || $key == Object::TIME_IN_SECONDS) { if ($this->OldObject == null && $this->NewObject->shoeID() > 0) { throw new \RuntimeException('For an update of distance or duration the old object has to be set.'); } } return parent::ignore($key); }