/** * Tasks before insertion */ protected function before() { parent::before(); if ($this->hasChanged(Object::ELEVATIONS_ORIGINAL) || $this->hasChanged(Object::ELEVATIONS_CORRECTED)) { $Calculator = new Calculator($this->NewObject); $Calculator->calculateElevation(); } }
/** * Tasks after insertion */ protected function after() { parent::after(); $this->updateEquipment(); $this->updateTag(); $this->updateStartTime(); $this->updateVDOTshapeAndCorrector(); $this->updateBasicEndurance(); }
/** * Construct updater * @param \PDO $connection * @param \Runalyze\Model\Equipment\Object $newObject [optional] * @param \Runalyze\Model\Equipment\Object $oldObject [optional] */ public function __construct(\PDO $connection, Object $newObject = null, Object $oldObject = null) { parent::__construct($connection, $newObject, $oldObject); }