public function Request::hasSession

Whether the request contains a Session object.

This method does not give any information about the state of the session object, like whether the session is started or not. It is just a way to check if this Request is associated with a Session instance.

@api

Return value

Boolean true when the Request contains a Session object, false otherwise

1 call to Request::hasSession()
Request::hasPreviousSession in drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Request.php
Whether the request contains a Session which was started in one of the previous requests.

File

drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Request.php, line 662

Class

Request
Request represents an HTTP request.

Namespace

Symfony\Component\HttpFoundation

Code

public function hasSession() {
  return null !== $this->session;
}