<?php
/**
 * inputobj_base.php - The base abstratc class for search input pages
 *
 * @author $Author: dtong $
 * @version $Id: inputobj_base.php,v 1.5 2011/02/11 14:09:29 dtong Exp $
 * @copyright Copyright (c) 2009, Tiller Software Co., Ltd.
*/
if ( ! defined('BASEPATH')) exit('No direct script access allowed');

abstract class inputobj_base {
	protected $data=NULL;
	protected $CI = NULL;

	function __construct($data) {
		$this->data = $data;
		$this->CI = & get_instance();
		osa_load_lang('mapping');
	}

	abstract public function render();

	protected function get_templatevalue($key) {
		if ( strpos($key, '_') !== 0 )
			$key = '_' . $key;
		return osa_value($this->data, $key, FALSE);
	}
}
?>