<?php

class multilang
{

    protected $_data = array();

    public function __construct($field = '', $lang_table = '', $lang_table_field = '', $callback_field = NULL)
    {
        $this->set_field($field);
        $this->set_lang_table($lang_table);
        $this->set_lang_table_field($lang_table_field);
        $this->set_callback_field($callback_field);
    }

    public function set_field($field = '')
    {

        $this->_data['field'] = $field;
    }

    public function set_lang_table($lang_table = '')
    {

        $this->_data['lang_table'] = $lang_table;
    }

    public function set_lang_table_field($lang_table_field = '')
    {

        $this->_data['lang_table_field'] = $lang_table_field;
    }

    public function set_callback_field($callback_field = NULL)
    {

        $this->_data['callback_field'] = $callback_field;
    }

    public function get_data($key = NULL)
    {
        if (is_null($key)) {

            return $this->_data;
        }

        return (isset($this->_data[$key])) ? $this->_data[$key] : FALSE;
    }

}
