Files
code-cegled/_class/class_milestone_training.php
2019-02-14 16:53:40 +01:00

140 lines
2.4 KiB
PHP

<?php
/**
* MILESTONE TRAINING
*/
class milestone_training
{
private $mst_id;
private $mst_date;
private $mst_count;
private $mst_month;
private $mst_trainings = null;
public function set_mst_data_by_id($_mst_id) {
global $sql;
$cat_assoc_array = $sql->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, $_trainings = NULL)
{
global $sql;
return $sql->insert_into('milestone_training', array(
'mst_date' => $_date,
'mst_count' => $_count,
'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;
}
}
?>