PHP 클래스 Dingo\Api\Http\Middleware\RateLimit

파일 보기 프로젝트 열기: dingo/api

보호된 프로퍼티들

프로퍼티 타입 설명
$handler Dingo\Api\Http\RateLimit\Handler Rate limit handler instance.
$router Dingo\Api\Routing\Router Router instance.

공개 메소드들

메소드 설명
__construct ( Router $router, Handler $handler ) : void Create a new rate limit middleware instance.
handle ( Dingo\Api\Http\Request $request, Closure $next ) : mixed Perform rate limiting before a request is executed.

보호된 메소드들

메소드 설명
getHeaders ( ) : array Get the headers for the response.
responseWithHeaders ( Response $response ) : Response Send the response with the rate limit headers.

메소드 상세

__construct() 공개 메소드

Create a new rate limit middleware instance.
public __construct ( Router $router, Handler $handler ) : void
$router Dingo\Api\Routing\Router
$handler Dingo\Api\Http\RateLimit\Handler
리턴 void

getHeaders() 보호된 메소드

Get the headers for the response.
protected getHeaders ( ) : array
리턴 array

handle() 공개 메소드

Perform rate limiting before a request is executed.
public handle ( Dingo\Api\Http\Request $request, Closure $next ) : mixed
$request Dingo\Api\Http\Request
$next Closure
리턴 mixed

responseWithHeaders() 보호된 메소드

Send the response with the rate limit headers.
protected responseWithHeaders ( Response $response ) : Response
$response Dingo\Api\Http\Response
리턴 Dingo\Api\Http\Response

프로퍼티 상세

$handler 보호되어 있는 프로퍼티

Rate limit handler instance.
protected Handler,Dingo\Api\Http\RateLimit $handler
리턴 Dingo\Api\Http\RateLimit\Handler

$router 보호되어 있는 프로퍼티

Router instance.
protected Router,Dingo\Api\Routing $router
리턴 Dingo\Api\Routing\Router