24 lines
392 B
PHP
Executable file
24 lines
392 B
PHP
Executable file
<?php
|
|
/*
|
|
* User session container
|
|
*/
|
|
|
|
namespace Sakura;
|
|
|
|
class Session
|
|
{
|
|
// Current user data
|
|
public $userId;
|
|
public $sessionId;
|
|
|
|
// Initialise new session
|
|
public function __construct()
|
|
{
|
|
|
|
// Check if a PHP session was already started and if not start one
|
|
if (session_status() != PHP_SESSION_ACTIVE) {
|
|
session_start();
|
|
}
|
|
|
|
}
|
|
}
|