<?php

/*
	PAYMENT TYPE CLASS
*/

class payment_type {
	private $pt_id;
	private $pt_name;


	public function set_pt_id($_id) {
		$this->pt_id = $_id;
	}

	public function get_pt_id() {
		return $this->pt_id;
	}

	public function set_pt_name($_name) {
		$this->pt_name = $_name;
	}

	public function get_pt_name() {
		return $this->pt_name;
	}

	public function set_pt_data_by_id($_id) {
		global $sql;
		$mod_query = "SELECT * FROM payment_type WHERE pt_id = " . $_id . ";";
		$mod_assoc_array = $sql->assoc_array($mod_query);
		foreach ($mod_assoc_array[0] as $field => $value) {
			$function_name = "set_" . $field;
			$this->$function_name($value); //alapadatok beállítása
		}

	}

}

?>
