Browse Source

'ViewContext' renamed to 'ViewContextInterface'.

tags/2.0.0-beta
Paul Klimov 11 years ago
parent
commit
e0294ea724
  1. 2
      framework/yii/base/Controller.php
  2. 4
      framework/yii/base/View.php
  3. 4
      framework/yii/base/ViewContextInterface.php
  4. 2
      framework/yii/base/Widget.php

2
framework/yii/base/Controller.php

@ -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.

4
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.');

4
framework/yii/base/ViewContext.php → 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 <klimov.paul@gmail.com>
* @since 2.0
*/
interface ViewContext
interface ViewContextInterface
{
/**
* Finds the view file based on the given view name.

2
framework/yii/base/Widget.php

@ -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.

Loading…
Cancel
Save