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