예제 #1
0
파일: Window.php 프로젝트: guancio/Runalyze
 /**
  * Prepare internal properties
  */
 protected function prepareProperties()
 {
     $this->DemandedTime = new Duration();
     $this->DemandedPace = new Pace(0, 1);
     $this->DemandedPace->setUnitEnum(PaceUnit::MIN_PER_KM);
     if (isset($_POST['distance'])) {
         $_POST['distance'] = str_replace(',', '.', $_POST['distance']);
     } elseif ($this->Context->activity()->splits()->isEmpty()) {
         $_POST['distance'] = Configuration::General()->distanceUnitSystem()->distanceToKmFactor();
     }
 }