Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.3.x will end 7 October 2024 (12 months).
  • Bug fixes for security issues in 4.3.x will end 21 April 2025 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.2.x is supported too.

(no description)

File Size: 228 lines (8 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

RedirectMiddleware:: (7 methods):
  __construct()
  __invoke()
  checkRedirect()
  withTracking()
  guardMax()
  modifyRequest()
  redirectUri()


Class: RedirectMiddleware  - X-Ref

Request redirect middleware.

Apply this middleware like other middleware using
{@see \GuzzleHttp\Middleware::redirect()}.

__construct(callable $nextHandler)   X-Ref

param: callable(RequestInterface, array): PromiseInterface $nextHandler Next handler to invoke.

__invoke(RequestInterface $request, array $options)   X-Ref
No description

checkRedirect(RequestInterface $request, array $options, ResponseInterface $response)   X-Ref

return: ResponseInterface|PromiseInterface

withTracking(PromiseInterface $promise, string $uri, int $statusCode)   X-Ref
Enable tracking on promise.


guardMax(RequestInterface $request, ResponseInterface $response, array &$options)   X-Ref
No description

modifyRequest(RequestInterface $request, array $options, ResponseInterface $response)   X-Ref
No description

redirectUri(RequestInterface $request,ResponseInterface $response,array $protocols)   X-Ref
Set the appropriate URL on the request based on the location header.