Moodle PHP Documentation 4.4
Moodle 4.4.1 (Build: 20240610) (db07c09afc5)
core\local\guzzle\redirect_middleware Class Reference
Inheritance diagram for core\local\guzzle\redirect_middleware:
GuzzleHttp\RedirectMiddleware

Public Member Functions

 __construct (callable $next, array $settings)
 Redirect middleware constructor.
 
 __invoke (RequestInterface $request, array $options)
 Curl security setup.
 
 modifyRequest (RequestInterface $request, array $options, ResponseInterface $response)
 

Static Public Member Functions

static setup (array $settings)
 Setup method for the redirect middleware.
 

Public Attributes

const HISTORY_HEADER = 'X-Guzzle-Redirect-History'
 
const STATUS_HISTORY_HEADER = 'X-Guzzle-Redirect-Status-History'
 

Static Public Attributes

static array $defaultSettings
 

Protected Member Functions

 set_security (curl_security_helper_base $securityhelper)
 Set the security according to settings.
 

Protected Attributes

curl_security_helper_base $securityhelper
 The helper to in use.
 
array $settings
 The settings or options from client.
 

Constructor & Destructor Documentation

◆ __construct()

core\local\guzzle\redirect_middleware::__construct ( callable $next,
array $settings )

Redirect middleware constructor.

Parameters
callable(RequestInterface,array)PromiseInterface $next The next handler to invoke
array$settingsThe options from the client

Member Function Documentation

◆ __invoke()

core\local\guzzle\redirect_middleware::__invoke ( RequestInterface $request,
array $options )

Curl security setup.

Parameters
RequestInterface$requestThe interface of the request
array$optionsThe options for the request
Return values
PromiseInterface

◆ set_security()

core\local\guzzle\redirect_middleware::set_security ( curl_security_helper_base $securityhelper)
protected

Set the security according to settings.

Parameters
curl_security_helper_base$securityhelper
Return values
void

◆ setup()

static core\local\guzzle\redirect_middleware::setup ( array $settings)
static

Setup method for the redirect middleware.

Parameters
array$settingsThe settings of the request
Return values
callable

Member Data Documentation

◆ $defaultSettings

array GuzzleHttp\RedirectMiddleware::$defaultSettings
staticinherited
Initial value:
= [
'max' => 5,
'protocols' => ['http', 'https'],
'strict' => false,
'referer' => false,
'track_redirects' => false,
]

The documentation for this class was generated from the following file: