WriteSafeSessionHandlerInterface.php 765 B

1234567891011121314151617181920212223242526272829
  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 is allowed to be written, FALSE otherwise.
  15. */
  16. public function setSessionWritable($flag);
  17. /**
  18. * Returns whether or not a session may be written to storage.
  19. *
  20. * @return bool
  21. * TRUE if the session is allowed to be written, FALSE otherwise.
  22. */
  23. public function isSessionWritable();
  24. }