<?php
/**
 * configfactory.php - The factory for mapping searche template
 *
 * @author $Author: dtong $
 * @version $Id: configfactory.php,v 1.6 2010/08/16 11:24:07 dtong Exp $
 * @copyright Copyright (c) 2009, Tiller Software Co., Ltd.
*/
if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class configfactory {
   public static function factory($template='') {
   	if ( $template == '' ) {
   		$CI =& get_instance();
   		$template = $CI->config->item('cms_mapping_template');
   		if ( $template === FALSE )
   			$template = $CI->config->item('cms_unit_org');
   	}
		if ( include_once CMS_TEMPLATEPATH_MAPPING . $template . '.php') {
			return search_config_data::get();
		}
			return FALSE;
   }
}

?>