diff core/lib/Drupal/Core/Session/SessionManagerInterface.php @ 0:4c8ae668cc8c

Initial import (non-working)
author Chris Cannam
date Wed, 29 Nov 2017 16:09:58 +0000
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/core/lib/Drupal/Core/Session/SessionManagerInterface.php	Wed Nov 29 16:09:58 2017 +0000
@@ -0,0 +1,35 @@
+<?php
+
+namespace Drupal\Core\Session;
+
+use Symfony\Component\HttpFoundation\Session\Storage\SessionStorageInterface;
+
+/**
+ * Defines the session manager interface.
+ */
+interface SessionManagerInterface extends SessionStorageInterface {
+
+  /**
+   * Ends a specific user's session(s).
+   *
+   * @param int $uid
+   *   User ID.
+   */
+  public function delete($uid);
+
+  /**
+   * Destroys the current session and removes session cookies.
+   */
+  public function destroy();
+
+  /**
+   * Sets the write safe session handler.
+   *
+   * @todo: This should be removed once all database queries are removed from
+   *   the session manager class.
+   *
+   * @var \Drupal\Core\Session\WriteSafeSessionHandlerInterface
+   */
+  public function setWriteSafeHandler(WriteSafeSessionHandlerInterface $handler);
+
+}