diff --git a/framework/yii/base/Controller.php b/framework/yii/base/Controller.php index 79c1f5e..d2f491c 100644 --- a/framework/yii/base/Controller.php +++ b/framework/yii/base/Controller.php @@ -25,7 +25,7 @@ use Yii; * @author Qiang Xue * @since 2.0 */ -class Controller extends Component implements ViewContext +class Controller extends Component implements ViewContextInterface { /** * @event ActionEvent an event raised right before executing a controller action. diff --git a/framework/yii/base/View.php b/framework/yii/base/View.php index 1cb9a59..bc5b972 100644 --- a/framework/yii/base/View.php +++ b/framework/yii/base/View.php @@ -89,7 +89,7 @@ class View extends Component /** - * @var ViewContext the context under which the [[renderFile()]] method is being invoked. + * @var ViewContextInterface the context under which the [[renderFile()]] method is being invoked. */ public $context; /** @@ -244,7 +244,7 @@ class View extends Component if ($context === null) { $context = $this->context; } - if ($context instanceof ViewContext) { + if ($context instanceof ViewContextInterface) { $file = $context->findViewFile($view); } else { throw new InvalidCallException('Current context is not supported.'); diff --git a/framework/yii/base/ViewContext.php b/framework/yii/base/ViewContextInterface.php similarity index 86% rename from framework/yii/base/ViewContext.php rename to framework/yii/base/ViewContextInterface.php index 4072ffc..4237eca 100644 --- a/framework/yii/base/ViewContext.php +++ b/framework/yii/base/ViewContextInterface.php @@ -8,7 +8,7 @@ namespace yii\base; /** - * ViewContext represents possible context for the view rendering. + * ViewContextInterface represents possible context for the view rendering. * It determines the way the non-global view files are searched. * This interface introduces method [[findViewFile]], which will be used * at [[View::render()]] to determine the file by view name, which does @@ -19,7 +19,7 @@ namespace yii\base; * @author Paul Klimov * @since 2.0 */ -interface ViewContext +interface ViewContextInterface { /** * Finds the view file based on the given view name. diff --git a/framework/yii/base/Widget.php b/framework/yii/base/Widget.php index 69da6a9..b6e0cd0 100644 --- a/framework/yii/base/Widget.php +++ b/framework/yii/base/Widget.php @@ -20,7 +20,7 @@ use Yii; * @author Qiang Xue * @since 2.0 */ -class Widget extends Component implements ViewContext +class Widget extends Component implements ViewContextInterface { /** * @var integer a counter used to generate [[id]] for widgets.