function StubNegotiationMiddleware::getContentType

Gets the normalized type of a request.

The normalized type is a short, lowercase version of the format, such as 'html', 'json' or 'atom'.

Parameters

\Symfony\Component\HttpFoundation\Request $request: The request object from which to extract the content type.

Return value

string The normalized type of a given request.

Overrides NegotiationMiddleware::getContentType

File

core/tests/Drupal/Tests/Core/StackMiddleware/NegotiationMiddlewareTest.php, line 154

Class

StubNegotiationMiddleware

Namespace

Drupal\Tests\Core\StackMiddleware

Code

public function getContentType(Request $request) {
  return parent::getContentType($request);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.