<?php

/**
 *--------------------------------------
 * 模板引擎基类
 *--------------------------------------
 * @project		: pfa
 * @author		: cblee
 * @created		: 2012-9-23
 * @copyright	: (c)2012 AsThis
 *--------------------------------------
 */

class Te extends Pfa
{
	protected $options = array(); /* 模板引擎参数 */

	/** 模板引擎工厂 */
	public function get_te($options = array())
	{
		if(!isset($options['teType']))
		{
			$options['teType'] = C('TE.TYPE');
		}
		$teClass = 'Te'.ucwords(strtolower($options['teType']));
		import('lib.ext.te.'.$teClass, PFA_PATH);
		$te = get_instance($teClass, $this->options);
		return $te;
	}

	/** 设置参数 */
	public function set_option($name, $value)
	{
		$this->options[$name] = $value;
	}

	/** 获取参数 */
	public function get_option($name)
	{
		return $this->options[$name];
	}
}

?>