YoastSEO_Vendor\GuzzleHttp
Middleware::mapRequest() public Yoast 1.0
Middleware that applies a map function to the request before passing to the next handler.
{} Это метод класса: Middleware{}
Хуков нет.
Возвращает
callable.
Использование
$result = Middleware::mapRequest( $fn );
- $fn(callable) (обязательный)
- Function that accepts a RequestInterface and returns a RequestInterface.
Код Middleware::mapRequest() Middleware::mapRequest Yoast 15.6.2
public static function mapRequest(callable $fn)
{
return function (callable $handler) use($fn) {
return function ($request, array $options) use($handler, $fn) {
return $handler($fn($request), $options);
};
};
}