Пример #1
0
 /**
  * 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();
     }
 }
Пример #2
0
 /**
  * Tasks after insertion
  */
 protected function after()
 {
     parent::after();
     $this->updateEquipment();
     $this->updateTag();
     $this->updateStartTime();
     $this->updateVDOTshapeAndCorrector();
     $this->updateBasicEndurance();
 }
Пример #3
0
 /**
  * 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);
 }