YoastSEO_Vendor\GuzzleHttp
RedirectMiddleware::guardMax() private Yoast 1.0
{} Это метод класса: RedirectMiddleware{}
Хуков нет.
Возвращает
Null. Ничего.
Использование
// private - только в коде основоного (родительского) класса $result = $this->guardMax( \YoastSEO_Vendor\Psr\Http\Message\RequestInterface $request, $options );
Код RedirectMiddleware::guardMax() RedirectMiddleware::guardMax Yoast 15.7
private function guardMax(\YoastSEO_Vendor\Psr\Http\Message\RequestInterface $request, array &$options)
{
$current = isset($options['__redirect_count']) ? $options['__redirect_count'] : 0;
$options['__redirect_count'] = $current + 1;
$max = $options['allow_redirects']['max'];
if ($options['__redirect_count'] > $max) {
throw new \YoastSEO_Vendor\GuzzleHttp\Exception\TooManyRedirectsException("Will not follow more than {$max} redirects", $request);
}
}