SessionManagerInterface.php 794 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. namespace Drupal\Core\Session;
  3. use Symfony\Component\HttpFoundation\Session\Storage\SessionStorageInterface;
  4. /**
  5. * Defines the session manager interface.
  6. */
  7. interface SessionManagerInterface extends SessionStorageInterface {
  8. /**
  9. * Ends a specific user's session(s).
  10. *
  11. * @param int $uid
  12. * User ID.
  13. */
  14. public function delete($uid);
  15. /**
  16. * Destroys the current session and removes session cookies.
  17. */
  18. public function destroy();
  19. /**
  20. * Sets the write safe session handler.
  21. *
  22. * @todo: This should be removed once all database queries are removed from
  23. * the session manager class.
  24. *
  25. * @var \Drupal\Core\Session\WriteSafeSessionHandlerInterface
  26. */
  27. public function setWriteSafeHandler(WriteSafeSessionHandlerInterface $handler);
  28. }