ViewRenderer.php 820 Bytes
Newer Older
Qiang Xue committed
1
<?php
Qiang Xue committed
2 3
/**
 * @link http://www.yiiframework.com/
Qiang Xue committed
4
 * @copyright Copyright (c) 2008 Yii Software LLC
Qiang Xue committed
5 6
 * @license http://www.yiiframework.com/license/
 */
Qiang Xue committed
7 8 9 10

namespace yii\base;

/**
Qiang Xue committed
11 12 13 14
 * ViewRenderer is the base class for view renderer classes.
 *
 * @author Qiang Xue <qiang.xue@gmail.com>
 * @since 2.0
Qiang Xue committed
15 16 17 18 19
 */
abstract class ViewRenderer extends Component
{
	/**
	 * Renders a view file.
Qiang Xue committed
20 21 22 23 24 25 26 27
	 *
	 * 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
28
	 */
Qiang Xue committed
29
	abstract public function render($view, $file, $params);
Qiang Xue committed
30
}