PHP code example of hasirciogli / session-wrapper
1. Go to this page and download the library: Download hasirciogli/session-wrapper library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
hasirciogli / session-wrapper example snippets
irciogli\Hdb\Interfaces\Database\Config\DatabaseConfigInterface;
use Hasirciogli\SessionWrapper\Session;
use Hasirciogli\SessionWrapper\Storage\MysqlStorage;
class DatabaseConfig implements DatabaseConfigInterface
{
const DB_HOST = "localhost";
const DB_NAME = "reseller";
const DB_USER = "root";
const DB_PASS = "1234";
public static function cfun()
{
return new DatabaseConfig();
}
}
$SessionClass = new Session(DatabaseConfig::cfun());
$SessionClass->Get("key");
$SessionClass->Set("key", "value");
die(PHP_EOL);