mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-09 09:47:25 +08:00
27 lines
585 B
PHP
27 lines
585 B
PHP
<?php
|
|
/**
|
|
* View class file.
|
|
*
|
|
* @link http://www.yiiframework.com/
|
|
* @copyright Copyright © 2008-2012 Yii Software LLC
|
|
* @license http://www.yiiframework.com/license/
|
|
*/
|
|
|
|
namespace yii\base;
|
|
|
|
/**
|
|
* @author Qiang Xue <qiang.xue@gmail.com>
|
|
* @since 2.0
|
|
*/
|
|
class View extends Component
|
|
{
|
|
public function render($context, $_file_, $_data_ = array())
|
|
{
|
|
// we use special variable names here to avoid conflict with extracted variables
|
|
extract($_data_, EXTR_PREFIX_SAME, 'data');
|
|
ob_start();
|
|
ob_implicit_flush(false);
|
|
require($_file_);
|
|
return ob_get_clean();
|
|
}
|
|
} |