Commit e0294ea7 by Paul Klimov

'ViewContext' renamed to 'ViewContextInterface'.

parent 83e353dd
......@@ -25,7 +25,7 @@ use Yii;
* @author Qiang Xue <qiang.xue@gmail.com>
* @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.
......
......@@ -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.');
......
......@@ -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 <klimov.paul@gmail.com>
* @since 2.0
*/
interface ViewContext
interface ViewContextInterface
{
/**
* Finds the view file based on the given view name.
......
......@@ -20,7 +20,7 @@ use Yii;
* @author Qiang Xue <qiang.xue@gmail.com>
* @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.
......
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