PHP code example of fyre / session
1. Go to this page and download the library: Download fyre/session 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/ */
fyre / session example snippets
use Fyre\Session\Session;
$session = new Session($container, $config);
$container->use(Config::class)->set('Session', $options);
$container->singleton(Session::class);
$session = $container->use(Session::class);
$session->clear();
$value = $session->consume($key);
$session->delete($key);
$session->destroy();
$value = $session->get($key);
$has = $session->has($key);
$id = $session->id();
$isActive = $session->isActive();
$session->refresh($deleteOldSession);
$session->set($key, $value);
$session->setFlash($key, $value);
$session->setTemp($key, $value, $expire);
$session->start($options);
$container->use(Config::class)->set('Session.handler', $options);
$container->use(Config::class)->set('Session.handler', $options);
$container->use(Config::class)->set('Session.handler', $options);
$container->use(Config::class)->set('Session.handler', $options);
$container->use(Config::class)->set('Session.handler', $options);
$container->use(Config::class)->set('Session.handler', $options);