You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
pdd-order-api/app/libs/tool/class.SessionTool.php

31 lines
752 B
PHP

<?php
class SessionTool {
public static function get($sessionName) {
return $_SESSION[$sessionName];
}
public static function set($sessionName, $sessionValue) {
$_SESSION[$sessionName] = $sessionValue;
}
public static function delete($sessionName) {
unset($_SESSION[$sessionName]);
}
public static function has($sessionName) {
return isset($_SESSION[$sessionName]);
}
public static function sessionUnset() {
session_unset();
}
public static function sessionDestroy() {
ZcSession::sessionDestroy();
}
public static function sessionStart() {
Zc::startSessionWithParams(\Zc::C('sessionName'), '', '', \Zc::C('sessionType'), []);
}
}