<?php

/**
* SHUTTLE
*/
class camp_accomodation_type 
{
	private $cat_id;
	private $cat_name;
	private $cat_deleted;

    /**
     * Gets the value of cat_id.
     *
     * @return mixed
     */
    public function get_cat_id()
    {
        return $this->cat_id;
    }

    /**
     * Sets the value of cat_id.
     *
     * @param mixed $cat_id the cat id
     *
     * @return self
     */
    private function set_cat_id($cat_id)
    {
        $this->cat_id = $cat_id;

        return $this;
    }

    /**
     * Gets the value of cat_name.
     *
     * @return mixed
     */
    public function get_cat_name()
    {
        return $this->cat_name;
    }

    /**
     * Sets the value of cat_name.
     *
     * @param mixed $cat_name the cat name
     *
     * @return self
     */
    private function set_cat_name($cat_name)
    {
        $this->cat_name = $cat_name;

        return $this;
    }

    private function set_cat_deleted($_item) {
    	$this->cat_deleted = $_item;
    }

    public function get_cat_deleted($_item) {
    	return $this->cat_deleted;
    }

    public function set_cat_data_by_id($_cat_id) {
		global $sql;
		$cat_assoc_array = $sql->assoc_array("select * from camp_accomodation_type where cat_id = " . $_cat_id);
		$cat_array = $cat_assoc_array[0];
        //alapadatok
		foreach ($cat_array as $field => $value) {
			$function_name = "set_" . $field;
			$this->$function_name($value);
		}

	}
}


?>