WriteSafeSessionHandlerInterface.php 803 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. namespace Drupal\Core\Session;
  3. /**
  4. * Provides an interface for session handlers where writing can be disabled.
  5. */
  6. interface WriteSafeSessionHandlerInterface {
  7. /**
  8. * Sets whether or not a session may be written to storage.
  9. *
  10. * It is not possible to enforce writing of the session data. This method is
  11. * only capable of forcibly disabling that session data is written to storage.
  12. *
  13. * @param bool $flag
  14. * TRUE if the session the session is allowed to be written, FALSE
  15. * otherwise.
  16. */
  17. public function setSessionWritable($flag);
  18. /**
  19. * Returns whether or not a session may be written to storage.
  20. *
  21. * @return bool
  22. * TRUE if the session the session is allowed to be written, FALSE
  23. * otherwise.
  24. */
  25. public function isSessionWritable();
  26. }