function Drupal::requestStack

Same name and namespace in other branches
  1. 9 core/lib/Drupal.php \Drupal::requestStack()
  2. 8.9.x core/lib/Drupal.php \Drupal::requestStack()
  3. 11.x core/lib/Drupal.php \Drupal::requestStack()

Retrieves the request stack.

Return value

\Symfony\Component\HttpFoundation\RequestStack The request stack

File

core/lib/Drupal.php, line 278

Class

Drupal
Static Service Container wrapper.

Code

public static function requestStack() {
  return static::getContainer()->get('request_stack');
}

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