ViewContextInterface.php 785 B

1234567891011121314151617181920212223242526
  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. * ViewContextInterface is the interface that should implemented by classes who want to support relative view names.
  10. *
  11. * The method [[findViewFile()]] should be implemented to convert a relative view name into a file path.
  12. *
  13. * @author Paul Klimov <[email protected]>
  14. * @since 2.0
  15. */
  16. interface ViewContextInterface
  17. {
  18. /**
  19. * Finds the view file corresponding to the specified relative view name.
  20. * @param string $view a relative view name. The name does NOT start with a slash.
  21. * @return string the view file path. Note that the file may not exist.
  22. */
  23. public function findViewFile($view);
  24. }