yogurt4php View 扩展--phplib

基于phplib   实现的 View 代码如下:

<?php
/**
 *  Yogurt : MVC Development Framework with PHP<http://www.yogurtframework.com/>
 * phplib view class of yogurt framework.
 *
 * @author          rick <[email protected]>
 * @copyright        Copyright (c)2009-2013 
 * @link            http://www.yogurtframework.com
 * @license         http://www.yogurtframework.com/license/
 * @filesource        yogurt4php/core/view/ViewPhplib.php
 * @since            Yogurt v 0.9
 * @version            $3.0
 */

require_once (LIB_PATH. 'phplib-7.4a/php/template.php');

class ViewPhplib extends Template implements IView {
   
    /**
     * construct of View
     * init smarty
     */
    public function __construct() {
        parent::Template();
    }
    
    /**
     *
     * @param unknown $key
     * @param unknown $value
     */
    public function viewAssign($key, $value=null) {
        $this->set_var($key, $value);
    }
   
    /**
     *
     * @param unknown $tpl
     * @param unknown $options
     */
    public function viewDisplay($tpl, $options){
        $this->set_root($options["tpl_dir"]);
        $this->filename($tpl);
    }
   
}
?>

猜你喜欢

转载自yogurt.iteye.com/blog/2339034