Sessionmiddleware
SessionMiddleware starts the PHP session when required and injects the session array into the request. It can enforce a fingerprint of IP address and user agent to prevent hijacking.
Helper methods allow you to get and set values safely so the rest of the code does not interact with $_SESSION directly.