File based session handler.  
 More...
|  | 
|  | __construct () | 
|  | Create new instance of handler. 
 | 
|  | 
|  | abort () | 
|  | Release lock on the session without writing it. 
 | 
|  | 
|  | init () | 
|  | Init session handler. 
 | 
|  | 
|  | kill_all_sessions () | 
|  | Kill all active sessions, the core sessions table is purged afterwards. 
 | 
|  | 
|  | kill_session ($sid) | 
|  | Kill one session, the session record is removed afterwards. 
 | 
|  | 
|  | requires_write_lock () | 
|  | Has this session been opened with a writelock? Your handler should call this during start() if you support read-only sessions. 
 | 
|  | 
|  | session_exists ($sid) | 
|  | Check the backend contains data for this session id. 
 | 
|  | 
|  | set_requires_write_lock ($requireswritelock) | 
|  | This is called after init() and before start() to indicate whether the session opened should be writable or not. 
 | 
|  | 
|  | start () | 
|  | Start the session. 
 | 
|  | 
|  | write_close () | 
|  | Write the session and release lock. 
 | 
|  | 
|  | 
| boolean | $requireswritelock = false | 
|  | $requireswritelock does the session need and/or have a lock? 
 | 
|  | 
| string | $sessiondir | 
|  | session dir 
 | 
|  | 
File based session handler. 
- Copyright
- 2013 Petr Skoda  
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 
◆ abort()
  
  | 
        
          | core\session\handler::abort | ( |  | ) |  |  | inherited | 
 
Release lock on the session without writing it. 
May not be possible in older versions of PHP. If so, session may be written anyway so that any locks are released. 
 
 
◆ init()
      
        
          | core\session\file::init | ( |  | ) |  | 
      
 
 
◆ kill_all_sessions()
      
        
          | core\session\file::kill_all_sessions | ( |  | ) |  | 
      
 
Kill all active sessions, the core sessions table is purged afterwards. 
Reimplemented from core\session\handler.
 
 
◆ kill_session()
      
        
          | core\session\file::kill_session | ( |  | $sid | ) |  | 
      
 
Kill one session, the session record is removed afterwards. 
- Parameters
- 
  
  
Reimplemented from core\session\handler.
 
 
◆ requires_write_lock()
  
  | 
        
          | core\session\handler::requires_write_lock | ( |  | ) |  |  | inherited | 
 
Has this session been opened with a writelock? Your handler should call this during start() if you support read-only sessions. 
- Return values
- 
  
    | bool | true if session is intended to have a write lock. |  
 
 
 
◆ session_exists()
      
        
          | core\session\file::session_exists | ( |  | $sid | ) |  | 
      
 
Check the backend contains data for this session id. 
Note: this is intended to be called from manager\session_exists() only.
- Parameters
- 
  
  
- Return values
- 
  
    | bool | true if session found. |  
 
Reimplemented from core\session\handler.
 
 
◆ set_requires_write_lock()
  
  | 
        
          | core\session\handler::set_requires_write_lock | ( |  | $requireswritelock | ) |  |  | inherited | 
 
This is called after init() and before start() to indicate whether the session opened should be writable or not. 
This is intentionally captured even if your handler doesn't support non-locking sessions, so that behavior (upon session close) matches closely between handlers. 
- Parameters
- 
  
    | bool | $requireswritelock | true if needs to be open for writing |  
 
 
 
◆ start()
  
  | 
        
          | core\session\handler::start | ( |  | ) |  |  | inherited | 
 
 
◆ write_close()
  
  | 
        
          | core\session\handler::write_close | ( |  | ) |  |  | inherited | 
 
Write the session and release lock. 
If the session was not intentionally opened with a write lock, then we will abort the session instead if able. 
 
 
The documentation for this class was generated from the following file: