assoc_array("select * from milestone_training where mst_id = " . $_mst_id); $cat_array = $cat_assoc_array[0]; //alapadatok foreach ($cat_array as $field => $value) { $function_name = "set_" . $field; $this->$function_name($value); } } public static function create_mst($_date, $_count, $_month, $_trainings = NULL) { global $sql; return $sql->insert_into('milestone_training', array( 'mst_date' => $_date, 'mst_count' => $_count, 'mst_month' => $_month, 'mst_trainings' => $_trainings, )); } /** * @return mixed */ public function get_mst_id() { return $this->mst_id; } /** * @param mixed $mst_id * * @return self */ public function set_mst_id($mst_id) { $this->mst_id = $mst_id; return $this; } /** * @return mixed */ public function get_mst_date() { return $this->mst_date; } /** * @param mixed $mst_date * * @return self */ public function set_mst_date($mst_date) { $this->mst_date = $mst_date; return $this; } /** * @return mixed */ public function get_mst_count() { return $this->mst_count; } /** * @param mixed $mst_count * * @return self */ public function set_mst_count($mst_count) { $this->mst_count = $mst_count; return $this; } /** * @return mixed */ public function get_mst_trainings() { return $this->mst_trainings; } /** * @param mixed $mst_trainings * * @return self */ public function set_mst_trainings($mst_trainings) { $this->mst_trainings = $mst_trainings; return $this; } /** * @return mixed */ public function get_mst_month() { return $this->mst_month; } /** * @param mixed $mst_month * * @return self */ public function set_mst_month($mst_month) { $this->mst_month = $mst_month; return $this; } } ?>