/** * Load shape * @param int $time * @return float */ private function loadShape($time) { $Shape = new Shape(DB::getInstance(), SessionAccountHandler::getId(), Configuration::General()->runningSport(), Configuration::Vdot()); $Shape->calculateAt($time); return $Shape->value(); }
/** * Recalculate VDOT shape * @return float new shape */ public function recalculateVDOTshape() { $Shape = new JD\Shape(DB::getInstance(), SessionAccountHandler::getId(), Configuration::General()->runningSport(), Configuration::Vdot()); $Shape->setCorrector(new JD\VDOTCorrector($this->vdotFactor())); $Shape->calculate(); $this->updateVdotShape($Shape->value()); return $Shape->value(); }
/** * @expectedException \RuntimeException */ public function testCallWithoutCalculation() { $Shape = new Shape($this->PDO, 1, 1, new CategoryFake()); $Shape->value(); }