AppserverIo\Appserver\ServletEngine\Http\Session::__construct PHP Method

__construct() public method

Constructor to initialize a newly created session.
public __construct ( mixed $id, string $name, integer | DateTime $lifetime, integer | null $maximumAge, string | null $domain, string $path, boolean $secure, boolean $httpOnly )
$id mixed The session ID
$name string The session name
$lifetime integer | DateTime Date and time after the session expires
$maximumAge integer | null Number of seconds until the session expires
$domain string | null The host to which the user agent will send this cookie
$path string The path describing the scope of this cookie
$secure boolean If this cookie should only be sent through a "secure" channel by the user agent
$httpOnly boolean If this cookie should only be used through the HTTP protocol
    public function __construct($id, $name, $lifetime, $maximumAge, $domain, $path, $secure, $httpOnly)
    {
        // set the session status flag
        $this->started = false;
        // initialize the session
        $this->init($id, $name, $lifetime, $maximumAge, $domain, $path, $secure, $httpOnly);
        // initialize the storage for the session data
        $this->data = array();
    }