SessionCacheContext::getLabel

public static SessionCacheContext::getLabel() File core/lib/Drupal/Core/Cache/Context/SessionCacheContext.php, line 17 Class SessionCacheContext Defines the SessionCacheContext service, for "per session" caching. Namespace Drupal\Core\Cache\Context Code public static function getLabel() { return t('Session'); }

SessionCacheContext::getContext

public SessionCacheContext::getContext() File core/lib/Drupal/Core/Cache/Context/SessionCacheContext.php, line 24 Class SessionCacheContext Defines the SessionCacheContext service, for "per session" caching. Namespace Drupal\Core\Cache\Context Code public function getContext() { $sid = $this->requestStack->getCurrentRequest()->getSession()->getId(); return Crypt::hashBase64($sid); }

SessionCacheContext

Defines the SessionCacheContext service, for "per session" caching. Cache context ID: 'session'. Hierarchy class \Drupal\Core\Cache\Context\RequestStackCacheContextBaseclass \Drupal\Core\Cache\Context\SessionCacheContext File core/lib/Drupal/Core/Cache/Context/SessionCacheContext.php, line 12 Namespace Drupal\Core\Cache\Context Members Name Modifiers Type Description RequestStackCacheContextBase::$requestStack protected property The request stack. RequestStackCacheCon

Session::__construct

public Session::__construct(HttpKernelInterface $http_kernel, $service_name = 'session') Constructs a Session stack middleware object. Parameters \Symfony\Component\HttpKernel\HttpKernelInterface $http_kernel: The decorated kernel. string $service_name: The name of the session service, defaults to "session". File core/lib/Drupal/Core/StackMiddleware/Session.php, line 42 Class Session Wrap session logic around a HTTP request. Namespace Drupal\Core\StackMiddleware Code public function _

Session::handle

public Session::handle(Request $request, $type = self::MASTER_REQUEST, $catch = TRUE) Handles a Request to convert it to a Response. When $catch is true, the implementation must catch all exceptions and do its best to convert them to a Response instance. Parameters Request $request A Request instance: int $type The type of the request: (one of HttpKernelInterface::MASTER_REQUEST or HttpKernelInterface::SUB_REQUEST) bool $catch Whether to catch exceptions or not: Return value Response A Respon

Session::$sessionServiceName

The session service name. Type: string File core/lib/Drupal/Core/StackMiddleware/Session.php, line 32 Class Session Wrap session logic around a HTTP request. Namespace Drupal\Core\StackMiddleware Code protected $sessionServiceName;

Session::$httpKernel

The wrapped HTTP kernel. Type: \Symfony\Component\HttpKernel\HttpKernelInterface File core/lib/Drupal/Core/StackMiddleware/Session.php, line 25 Class Session Wrap session logic around a HTTP request. Namespace Drupal\Core\StackMiddleware Code protected $httpKernel;

Session

Wrap session logic around a HTTP request. Note, the session service is not injected into this class in order to prevent premature initialization of session storage (database). Instead the session service is retrieved from the container only when handling the request. Hierarchy class \Drupal\Core\StackMiddleware\Session implements HttpKernelInterface uses ContainerAwareTrait File core/lib/Drupal/Core/StackMiddleware/Session.php, line 16 Namespace Drupal\Core\StackMiddleware Members Nam

Services and Dependency Injection Container

Overview of the Dependency Injection Container and Services. Overview of container, injection, and services The Services and Dependency Injection Container concepts have been adopted by Drupal from the Symfony framework. A "service" (such as accessing the database, sending email, or translating user interface text) is defined (given a name and an interface or at least a class that defines the methods that may be called), and a default class is designated to provide the service. These two steps

ServiceProviderInterface::register

public ServiceProviderInterface::register(ContainerBuilder $container) Registers services to the container. Parameters ContainerBuilder $container: The ContainerBuilder to register services to. File core/lib/Drupal/Core/DependencyInjection/ServiceProviderInterface.php, line 18 Class ServiceProviderInterface Interface that all service providers must implement. Namespace Drupal\Core\DependencyInjection Code public function register(ContainerBuilder $container);