Equip\Handler\ExceptionHandler::type PHP Метод

type() приватный Метод

Determine the preferred content type for the current request
private type ( Psr\Http\Message\ServerRequestInterface $request ) : string
$request Psr\Http\Message\ServerRequestInterface
Результат string
    private function type(ServerRequestInterface $request)
    {
        $accept = $request->getHeaderLine('Accept');
        $priorities = $this->preferences->toArray();
        if (!empty($accept)) {
            $preferred = $this->negotiator->getBest($accept, array_keys($priorities));
        }
        if (!empty($preferred)) {
            return $preferred->getValue();
        }
        return key($priorities);
    }