Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

65 lines (55 sloc) 0.925 kb
<?php
/**
* dropFW : PHP Web Development Framework
* Copyright 2010, Pavan Kumar Sunkara
*
* Licensed under The MIT License
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright 2010
* @version 1.0.0
* @author Pavan Kumar Sunkara
* @license MIT
*/
class Session extends Object {
/**
* Constructor.
*/
function __construct() {
session_start();
}
/**
* Method to set session variable
*/
function set($key, $val) {
$_SESSION[$key] = $val;
}
/**
* Method to get session variable
*/
function get($key) {
return $_SESSION[$key];
}
/**
* Method to delete session variable
*/
function delete($key) {
unset($_SESSION[$key]);
}
/**
* Method to check session variable
*/
function check($key) {
if(array_key_exists($key,$_SESSION))
return true;
else
return false;
}
/**
* Destructor
*/
function __destruct() {
session_unset();
}
}
?>
Jump to Line
Something went wrong with that request. Please try again.