コード例 #1
0
 /**
  * Insert training
  * @param int $i
  */
 protected function insertTraining($i)
 {
     if (!isset($_POST['training-data'][$i])) {
         return;
     }
     $Data = unserialize(urldecode($_POST['training-data'][$i]));
     $Training = new TrainingObject(DataObject::$DEFAULT_ID);
     $Training->setFromArray($Data);
     $Training->setWeatherForecast();
     $Training->insert();
     $this->InsertedIDs[] = $Training->id();
 }