Table of Contents
The Session class keeps a list of global variable names and provides a set of functions to load and save these variables from and to a data storage container (we will call it container for shortness). The named variables may be scalar variables (strings, integers and floats) or arrays. Objects are handled as well, provided they implement two instance variables naming their class and enumerating their (persistent) slots.
Accessible instance variables
| classname | Serialization helper: The name of this class |
| magic | A secret string used in ID creation. Change it! |
| mode | Mode of Session ID propagation. Either cookie or get. |
| fallback_mode | Mode of Session ID propagation should $mode not work. Set $mode to cookie and $fallback_mode to get |
| lifetime | Lifetime of the session cookie in minutes or 0 to use session cookies. |
| gc_time | Garbage collection tuning parameter, see below |
| gc_probability | Garbage collection tuning parameter, see below. |
| allowcache | Control caching of session pages, if set to no (also the default), the page is not cached under HTTP/1.1 or HTTP/1.0; if set to public , the page is publically cached under HTTP/1.1 and HTTP/1.0; if set to private , the page is privately cached under HTTP/1.1 and not cached under HTTP/1.0 |
| allowcache_expires | When caching is allowed, the pages can be cached for this many minutes. |
| that_class | A classname. Session uses this class to store and retrieve data |
| auto_init | The file to be loaded on session establishment. |
| secure_auto_init | Set to 0, if all pages always call page_close() (This is never the case!). |
Internal instance variables