コード例 #1
0
ファイル: TableRow.php プロジェクト: n0rthface/Runalyze
 /**
  * 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();
 }
コード例 #2
0
ファイル: Data.php プロジェクト: guancio/Runalyze
 /**
  * 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();
 }
コード例 #3
0
ファイル: ShapeTest.php プロジェクト: n0rthface/Runalyze
 /**
  * @expectedException \RuntimeException
  */
 public function testCallWithoutCalculation()
 {
     $Shape = new Shape($this->PDO, 1, 1, new CategoryFake());
     $Shape->value();
 }