<?php

class setting {
	private $set_id;
	private $set_name;
	private $set_setting_type_st_id; //id
	private $set_setting_type; //obj

	public function set_setting_data_by_id($_id) {
		global $sql;
		$set_data_assoc_array = $sql->assoc_array("select * from setting where set_id = " . $_id);
		$set_data_array = $set_data_assoc_array[0];
		foreach ($set_data_array as $field => $value) {
			$function_name = "set_" . $field;
			$this->$function_name($value); //alapadatok beállítása

			if ($field == 'set_setting_type_st_id') {
				$new_st = new setting_type();
				$new_st->set_setting_type_data_by_id($value);
				$this->set_set_setting_type($new_st);
			}
		}

	}

	public function set_set_id($_item) {
		$this->set_id = $_item;
	}

	public function set_set_name($_item) {
		$this->set_name = $_item;
	}

	public function set_set_setting_type_st_id($_item) {
		$this->set_setting_type_st_id = $_item;
	}

	public function set_set_setting_type($_item) {
		$this->set_setting_type = $_item;
	}


	public function get_set_id() {
		return $this->set_id;
	}

	public function get_set_name() {
		return $this->set_name;
	}

	public function get_set_setting_type_st_id() {
		return $this->set_setting_type_st_id;
	}

	public function get_set_setting_type() {
		return $this->set_setting_type;
	}

}


?>