amdp3-metaforums/Application/Services/Session.php

24 lines
492 B
PHP
Raw Permalink Normal View History

2019-11-18 13:33:45 +00:00
<?php
namespace Application\Services;
class Session {
public function __construct() {
session_start();
}
public function get($path) {
return $_SESSION[$path];
}
public function set($path, $val) {
$_SESSION[$path] = $val;
}
public function unset($path) {
$_SESSION[$path] = null;
}
public function has($path) {
return isset($_SESSION[$path]);
}
public function destroy() {
session_destroy();
}
}