ViewRenderer.php 854 Bytes
Newer Older
Qiang Xue committed
1
<?php
Qiang Xue committed
2 3 4 5 6 7 8
/**
 * ViewRenderer class file.
 *
 * @link http://www.yiiframework.com/
 * @copyright Copyright &copy; 2008 Yii Software LLC
 * @license http://www.yiiframework.com/license/
 */
Qiang Xue committed
9 10 11 12

namespace yii\base;

/**
Qiang Xue committed
13 14 15 16
 * ViewRenderer is the base class for view renderer classes.
 *
 * @author Qiang Xue <qiang.xue@gmail.com>
 * @since 2.0
Qiang Xue committed
17 18 19 20 21
 */
abstract class ViewRenderer extends Component
{
	/**
	 * Renders a view file.
Qiang Xue committed
22 23 24 25 26 27 28 29
	 *
	 * This method is invoked by [[View]] whenever it tries to render a view.
	 * Child classes must implement this method to render the given view file.
	 *
	 * @param View $view the view object used for rendering the file.
	 * @param string $file the view file.
	 * @param array $params the parameters to be passed to the view file.
	 * @return string the rendering result
Qiang Xue committed
30
	 */
Qiang Xue committed
31
	abstract public function render($view, $file, $params);
Qiang Xue committed
32
}