24 lines
392 B
PHP
24 lines
392 B
PHP
<?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();
|
|
}
|
|
|
|
}
|
|
}
|