You are here

protected function ExtensionStreamBase::getRequest in System stream wrapper 8

Returns the current request object.

Return value

\Symfony\Component\HttpFoundation\Request The current request object.

File

src/StreamWrapper/ExtensionStreamBase.php, line 101

Class

ExtensionStreamBase
Defines a base stream wrapper implementation.

Namespace

Drupal\system_stream_wrapper\StreamWrapper

Code

protected function getRequest() {
  if (!isset($this->request)) {
    $this->request = \Drupal::service('request_stack')
      ->getCurrentRequest();
  }
  return $this->request;
}