Commit e0294ea7 by Paul Klimov

'ViewContext' renamed to 'ViewContextInterface'.

parent 83e353dd
...@@ -25,7 +25,7 @@ use Yii; ...@@ -25,7 +25,7 @@ use Yii;
* @author Qiang Xue <qiang.xue@gmail.com> * @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0 * @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. * @event ActionEvent an event raised right before executing a controller action.
......
...@@ -89,7 +89,7 @@ class View extends Component ...@@ -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; public $context;
/** /**
...@@ -244,7 +244,7 @@ class View extends Component ...@@ -244,7 +244,7 @@ class View extends Component
if ($context === null) { if ($context === null) {
$context = $this->context; $context = $this->context;
} }
if ($context instanceof ViewContext) { if ($context instanceof ViewContextInterface) {
$file = $context->findViewFile($view); $file = $context->findViewFile($view);
} else { } else {
throw new InvalidCallException('Current context is not supported.'); throw new InvalidCallException('Current context is not supported.');
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
namespace yii\base; 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. * It determines the way the non-global view files are searched.
* This interface introduces method [[findViewFile]], which will be used * This interface introduces method [[findViewFile]], which will be used
* at [[View::render()]] to determine the file by view name, which does * at [[View::render()]] to determine the file by view name, which does
...@@ -19,7 +19,7 @@ namespace yii\base; ...@@ -19,7 +19,7 @@ namespace yii\base;
* @author Paul Klimov <klimov.paul@gmail.com> * @author Paul Klimov <klimov.paul@gmail.com>
* @since 2.0 * @since 2.0
*/ */
interface ViewContext interface ViewContextInterface
{ {
/** /**
* Finds the view file based on the given view name. * Finds the view file based on the given view name.
......
...@@ -20,7 +20,7 @@ use Yii; ...@@ -20,7 +20,7 @@ use Yii;
* @author Qiang Xue <qiang.xue@gmail.com> * @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0 * @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. * @var integer a counter used to generate [[id]] for widgets.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment