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