123456789101112131415161718192021222324252627282930
  1. <?php
  2. /**
  3. * @link http://www.yiiframework.com/
  4. * @copyright Copyright (c) 2008 Yii Software LLC
  5. * @license http://www.yiiframework.com/license/
  6. */
  7. namespace yii\base;
  8. /**
  9. * ViewRenderer is the base class for view renderer classes.
  10. *
  11. * @author Qiang Xue <qiang.xue@gmail.com>
  12. * @since 2.0
  13. */
  14. abstract class ViewRenderer extends Component
  15. {
  16. /**
  17. * Renders a view file.
  18. *
  19. * This method is invoked by [[View]] whenever it tries to render a view.
  20. * Child classes must implement this method to render the given view file.
  21. *
  22. * @param View $view the view object used for rendering the file.
  23. * @param string $file the view file.
  24. * @param array $params the parameters to be passed to the view file.
  25. * @return string the rendering result
  26. */
  27. abstract public function render($view, $file, $params);
  28. }