mirror of
https://github.com/yiisoft/yii2.git
synced 2025-12-15 10:50:45 +08:00
Fix #20666: Add missing generics in yii\base, yii\console, yii\filters and yii\web namespaces
This commit is contained in:
@@ -9,6 +9,7 @@ namespace yii\filters;
|
||||
|
||||
use Yii;
|
||||
use yii\base\ActionFilter;
|
||||
use yii\base\Component;
|
||||
use yii\di\Instance;
|
||||
use yii\web\ForbiddenHttpException;
|
||||
use yii\web\IdentityInterface;
|
||||
@@ -53,6 +54,9 @@ use yii\web\User;
|
||||
*
|
||||
* @author Qiang Xue <qiang.xue@gmail.com>
|
||||
* @since 2.0
|
||||
*
|
||||
* @template T of Component
|
||||
* @extends ActionFilter<T>
|
||||
*/
|
||||
class AccessControl extends ActionFilter
|
||||
{
|
||||
|
||||
@@ -9,6 +9,7 @@ namespace yii\filters;
|
||||
|
||||
use Yii;
|
||||
use yii\base\ActionFilter;
|
||||
use yii\base\Component;
|
||||
use yii\web\BadRequestHttpException;
|
||||
use yii\web\Request;
|
||||
|
||||
@@ -29,6 +30,9 @@ use yii\web\Request;
|
||||
*
|
||||
* @author Dmitry Dorogin <dmirogin@ya.ru>
|
||||
* @since 2.0.13
|
||||
*
|
||||
* @template T of Component
|
||||
* @extends ActionFilter<T>
|
||||
*/
|
||||
class AjaxFilter extends ActionFilter
|
||||
{
|
||||
|
||||
@@ -10,6 +10,7 @@ namespace yii\filters;
|
||||
use Yii;
|
||||
use yii\base\ActionFilter;
|
||||
use yii\base\BootstrapInterface;
|
||||
use yii\base\Component;
|
||||
use yii\web\BadRequestHttpException;
|
||||
use yii\web\NotAcceptableHttpException;
|
||||
use yii\web\Request;
|
||||
@@ -82,6 +83,9 @@ use yii\web\Response;
|
||||
*
|
||||
* @author Qiang Xue <qiang.xue@gmail.com>
|
||||
* @since 2.0
|
||||
*
|
||||
* @template T of Component
|
||||
* @extends ActionFilter<T>
|
||||
*/
|
||||
class ContentNegotiator extends ActionFilter implements BootstrapInterface
|
||||
{
|
||||
|
||||
@@ -10,6 +10,7 @@ namespace yii\filters;
|
||||
use Yii;
|
||||
use yii\base\Action;
|
||||
use yii\base\ActionFilter;
|
||||
use yii\base\Component;
|
||||
use yii\base\Controller;
|
||||
use yii\base\InvalidConfigException;
|
||||
use yii\web\Request;
|
||||
@@ -68,6 +69,9 @@ use yii\web\Response;
|
||||
*
|
||||
* @author Philippe Gaultier <pgaultier@gmail.com>
|
||||
* @since 2.0
|
||||
*
|
||||
* @template T of Component
|
||||
* @extends ActionFilter<T>
|
||||
*/
|
||||
class Cors extends ActionFilter
|
||||
{
|
||||
|
||||
@@ -10,6 +10,7 @@ namespace yii\filters;
|
||||
use Yii;
|
||||
use yii\base\Action;
|
||||
use yii\base\ActionFilter;
|
||||
use yii\base\Component;
|
||||
use yii\base\Controller;
|
||||
use yii\helpers\StringHelper;
|
||||
use yii\web\NotFoundHttpException;
|
||||
@@ -65,6 +66,9 @@ use yii\web\NotFoundHttpException;
|
||||
*
|
||||
* @author Paul Klimov <klimov.paul@gmail.com>
|
||||
* @since 2.0.11
|
||||
*
|
||||
* @template T of Component
|
||||
* @extends ActionFilter<T>
|
||||
*/
|
||||
class HostControl extends ActionFilter
|
||||
{
|
||||
|
||||
@@ -9,6 +9,7 @@ namespace yii\filters;
|
||||
|
||||
use Yii;
|
||||
use yii\base\ActionFilter;
|
||||
use yii\base\Component;
|
||||
|
||||
/**
|
||||
* HttpCache implements client-side caching by utilizing the `Last-Modified` and `ETag` HTTP headers.
|
||||
@@ -41,6 +42,9 @@ use yii\base\ActionFilter;
|
||||
* @author Da:Sourcerer <webmaster@dasourcerer.net>
|
||||
* @author Qiang Xue <qiang.xue@gmail.com>
|
||||
* @since 2.0
|
||||
*
|
||||
* @template T of Component
|
||||
* @extends ActionFilter<T>
|
||||
*/
|
||||
class HttpCache extends ActionFilter
|
||||
{
|
||||
|
||||
@@ -10,6 +10,7 @@ namespace yii\filters;
|
||||
use Closure;
|
||||
use Yii;
|
||||
use yii\base\ActionFilter;
|
||||
use yii\base\Component;
|
||||
use yii\base\DynamicContentAwareInterface;
|
||||
use yii\base\DynamicContentAwareTrait;
|
||||
use yii\caching\CacheInterface;
|
||||
@@ -50,6 +51,9 @@ use yii\web\Response;
|
||||
* @author Qiang Xue <qiang.xue@gmail.com>
|
||||
* @author Sergey Makinen <sergey@makinen.ru>
|
||||
* @since 2.0
|
||||
*
|
||||
* @template T of Component
|
||||
* @extends ActionFilter<T>
|
||||
*/
|
||||
class PageCache extends ActionFilter implements DynamicContentAwareInterface
|
||||
{
|
||||
|
||||
@@ -11,6 +11,7 @@ use Closure;
|
||||
use Yii;
|
||||
use yii\base\Action;
|
||||
use yii\base\ActionFilter;
|
||||
use yii\base\Component;
|
||||
use yii\base\Controller;
|
||||
use yii\web\IdentityInterface;
|
||||
use yii\web\Request;
|
||||
@@ -40,6 +41,9 @@ use yii\web\TooManyRequestsHttpException;
|
||||
*
|
||||
* @author Qiang Xue <qiang.xue@gmail.com>
|
||||
* @since 2.0
|
||||
*
|
||||
* @template T of Component
|
||||
* @extends ActionFilter<T>
|
||||
*/
|
||||
class RateLimiter extends ActionFilter
|
||||
{
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
namespace yii\filters;
|
||||
|
||||
use Yii;
|
||||
use yii\base\Action;
|
||||
use yii\base\ActionEvent;
|
||||
use yii\base\Behavior;
|
||||
use yii\web\Controller;
|
||||
@@ -89,6 +90,9 @@ class VerbFilter extends Behavior
|
||||
* @param ActionEvent $event
|
||||
* @return bool
|
||||
* @throws MethodNotAllowedHttpException when the request method is not allowed.
|
||||
*
|
||||
* @phpstan-param ActionEvent<Action<Controller>> $event
|
||||
* @psalm-param ActionEvent<Action<Controller>> $event
|
||||
*/
|
||||
public function beforeAction($event)
|
||||
{
|
||||
|
||||
@@ -10,6 +10,7 @@ namespace yii\filters\auth;
|
||||
use Yii;
|
||||
use yii\base\Action;
|
||||
use yii\base\ActionFilter;
|
||||
use yii\base\Component;
|
||||
use yii\base\Controller;
|
||||
use yii\helpers\StringHelper;
|
||||
use yii\web\IdentityInterface;
|
||||
@@ -23,6 +24,9 @@ use yii\web\User;
|
||||
*
|
||||
* @author Qiang Xue <qiang.xue@gmail.com>
|
||||
* @since 2.0
|
||||
*
|
||||
* @template T of Component
|
||||
* @extends ActionFilter<T>
|
||||
*/
|
||||
abstract class AuthMethod extends ActionFilter implements AuthInterface
|
||||
{
|
||||
|
||||
@@ -9,6 +9,7 @@ namespace yii\filters\auth;
|
||||
|
||||
use Yii;
|
||||
use yii\base\ActionFilter;
|
||||
use yii\base\Component;
|
||||
use yii\base\Controller;
|
||||
use yii\base\InvalidConfigException;
|
||||
|
||||
@@ -37,6 +38,9 @@ use yii\base\InvalidConfigException;
|
||||
*
|
||||
* @author Qiang Xue <qiang.xue@gmail.com>
|
||||
* @since 2.0
|
||||
*
|
||||
* @template T of Component
|
||||
* @extends AuthMethod<T>
|
||||
*/
|
||||
class CompositeAuth extends AuthMethod
|
||||
{
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
|
||||
namespace yii\filters\auth;
|
||||
|
||||
use yii\base\Component;
|
||||
|
||||
/**
|
||||
* HttpBasicAuth is an action filter that supports the HTTP Basic authentication method.
|
||||
*
|
||||
@@ -56,6 +58,9 @@ namespace yii\filters\auth;
|
||||
*
|
||||
* @author Qiang Xue <qiang.xue@gmail.com>
|
||||
* @since 2.0
|
||||
*
|
||||
* @template T of Component
|
||||
* @extends AuthMethod<T>
|
||||
*/
|
||||
class HttpBasicAuth extends AuthMethod
|
||||
{
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
|
||||
namespace yii\filters\auth;
|
||||
|
||||
use yii\base\Component;
|
||||
|
||||
/**
|
||||
* HttpBearerAuth is an action filter that supports the authentication method based on HTTP Bearer token.
|
||||
*
|
||||
@@ -25,6 +27,9 @@ namespace yii\filters\auth;
|
||||
*
|
||||
* @author Qiang Xue <qiang.xue@gmail.com>
|
||||
* @since 2.0
|
||||
*
|
||||
* @template T of Component
|
||||
* @extends HttpHeaderAuth<T>
|
||||
*/
|
||||
class HttpBearerAuth extends HttpHeaderAuth
|
||||
{
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
|
||||
namespace yii\filters\auth;
|
||||
|
||||
use yii\base\Component;
|
||||
|
||||
/**
|
||||
* HttpHeaderAuth is an action filter that supports HTTP authentication through HTTP Headers.
|
||||
*
|
||||
@@ -30,6 +32,9 @@ namespace yii\filters\auth;
|
||||
* @author Qiang Xue <qiang.xue@gmail.com>
|
||||
* @author Benoît Boure <benoit.boure@gmail.com>
|
||||
* @since 2.0.14
|
||||
*
|
||||
* @template T of Component
|
||||
* @extends AuthMethod<T>
|
||||
*/
|
||||
class HttpHeaderAuth extends AuthMethod
|
||||
{
|
||||
|
||||
@@ -7,11 +7,16 @@
|
||||
|
||||
namespace yii\filters\auth;
|
||||
|
||||
use yii\base\Component;
|
||||
|
||||
/**
|
||||
* QueryParamAuth is an action filter that supports the authentication based on the access token passed through a query parameter.
|
||||
*
|
||||
* @author Qiang Xue <qiang.xue@gmail.com>
|
||||
* @since 2.0
|
||||
*
|
||||
* @template T of Component
|
||||
* @extends AuthMethod<T>
|
||||
*/
|
||||
class QueryParamAuth extends AuthMethod
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user