jemer / session
Session manager for php projects
Installs: 7
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/jemer/session
README
Session manager for Php projects.
Useage
composer require jemer/session
Start a new session by calling the SessionManager::Instance()->Start method. Pass in any session properties that you would want.
use Jemer\Session\SessionManager; SessionManager::Instance()->Start([ "username" => "Bob", "role" => "manager", "yearsOfService" => 15 ]);
To get a property from the session manager just call its Get() and pass in the name of the key. In this case were looking for the "username"
echo SessionManager::Instance()->Get("username"); returns: Bob
To end the session just call the SessionManager::Instance()->End(). This will end the session and remove all values from the $_SESSION array.