You are here

public function RequestStack::getMainRequest in Drupal 10

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Http/RequestStack.php \Drupal\Core\Http\RequestStack::getMainRequest()

Gets the main request.

Return value

\Symfony\Component\HttpFoundation\Request|null The main request.

File

core/lib/Drupal/Core/Http/RequestStack.php, line 28

Class

RequestStack
Forward-compatibility shim for Symfony's RequestStack.

Namespace

Drupal\Core\Http

Code

public function getMainRequest() : ?Request {
  @trigger_error('The ' . __NAMESPACE__ . '\\RequestStack is deprecated in drupal:10.0.0 and is removed from drupal:11.0.0. There is no replacement. See https://www.drupal.org/node/3265357', E_USER_DEPRECATED);
  return parent::getMainRequest();
}