mirror of
https://github.com/yiisoft/yii2.git
synced 2025-12-15 19:01:19 +08:00
Add generics for all controllers (#20675)
This commit is contained in:
@@ -9,6 +9,7 @@ namespace yii\rest;
|
||||
|
||||
use yii\base\InvalidConfigException;
|
||||
use yii\base\Model;
|
||||
use yii\base\Module;
|
||||
use yii\web\ForbiddenHttpException;
|
||||
|
||||
/**
|
||||
@@ -36,6 +37,9 @@ use yii\web\ForbiddenHttpException;
|
||||
*
|
||||
* @author Qiang Xue <qiang.xue@gmail.com>
|
||||
* @since 2.0
|
||||
*
|
||||
* @template T of Module
|
||||
* @extends Controller<T>
|
||||
*/
|
||||
class ActiveController extends Controller
|
||||
{
|
||||
|
||||
@@ -13,6 +13,8 @@ use yii\filters\ContentNegotiator;
|
||||
use yii\filters\RateLimiter;
|
||||
use yii\filters\VerbFilter;
|
||||
use yii\web\Response;
|
||||
use yii\web\Controller as WebController;
|
||||
use yii\base\Module;
|
||||
|
||||
/**
|
||||
* Controller is the base class for RESTful API controller classes.
|
||||
@@ -29,8 +31,11 @@ use yii\web\Response;
|
||||
*
|
||||
* @author Qiang Xue <qiang.xue@gmail.com>
|
||||
* @since 2.0
|
||||
*
|
||||
* @template T of Module
|
||||
* @extends WebController<T>
|
||||
*/
|
||||
class Controller extends \yii\web\Controller
|
||||
class Controller extends WebController
|
||||
{
|
||||
/**
|
||||
* @var string|array the configuration for creating the serializer that formats the response data.
|
||||
|
||||
Reference in New Issue
Block a user