SproutCMS

This is the code documentation for the SproutCMS project

class Session

Session library.

Extending this class

<?php
/**
* New class description goes here
* 
* @author Your Name, 2026-08-23
**/
class NewClassName extends Session {
    
    /**
    * Removes all session variables.
    **/
    public function deletall () {
        // Method code goes here
    }
    
    /**
    * Get a variable, and delete it.
    **/
    public function getOnce (string $key, mixed $default) {
        // Method code goes here
    }
    
    /**
    * Delete one or more variables.
    **/
    public function delete (string $keys) {
        // Method code goes here
    }
    
    public function has (string $key) {
        // Method code goes here
    }
    
    /**
    * Freshen one, multiple or all flash variables.
    **/
    public function keepFlash (string $keys) {
        // Method code goes here
    }
    
    /**
    * Expires old flash data and removes it from the session.
    **/
    public function expireFlash () {
        // Method code goes here
    }
    
    /**
    * Get a variable. Access to sub-arrays is supported with key.subkey.
    **/
    public function get (string $key, mixed $default) {
        // Method code goes here
    }
    
    /**
    * Runs the system.session_write event, then calls session_write_close.
    **/
    public function writeClose () {
        // Method code goes here
    }
    
    /**
    * Set a session variable.
    **/
    public function set (string|array $keys, mixed $val) {
        // Method code goes here
    }
    
    /**
    * Set a flash variable.
    **/
    public function setFlash (string|array $keys, mixed $val) {
        // Method code goes here
    }
    
    /**
    * Destroys the current session.
    **/
    public function destroy () {
        // Method code goes here
    }
    
    /**
    * Regenerates the global session id.
    **/
    public function regenerate () {
        // Method code goes here
    }
    
    /**
    * Create a new session.
    **/
    public function create (array $vars) {
        // Method code goes here
    }
    
    /**
    * Get the session id.
    **/
    public function id () {
        // Method code goes here
    }
    
    /**
    * On first session instance creation, sets up the driver and creates session.
    **/
    public function __construct () {
        // Method code goes here
    }
    
    /**
    * Singleton instance of Session.
    **/
    public function instance () {
        // Method code goes here
    }
    
}
?>