<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

class Sessao_nativa {

    public function __construct() {
        session_start();
    }

    function set($key, $value) {
        $_SESSION[$key] = $value;
    }

    function get($key) {
        return isset($_SESSION[$key]) ? $_SESSION[$key] : null;
    }

    function regenate_id($del_antigo_id = false) {
        session_regenerate_id($del_antigo_id);
    }

    function delete($key) {
        unset($_SESSION[$key]);
    }

}
