AppserverIo\Appserver\ServletEngine\Session\FilesystemSessionHandler::load PHP Method

load() public method

Loads the session with the passed ID from the persistence layer and returns it.
public load ( string $id ) : AppserverIo\Psr\Servlet\ServletSessionInterface
$id string The ID of the session we want to unpersist
return AppserverIo\Psr\Servlet\ServletSessionInterface The unpersisted session
    public function load($id)
    {
        try {
            // prepare the pathname to the file containing the session data
            $filename = $this->getSessionSettings()->getSessionFilePrefix() . $id;
            $pathname = $this->getSessionSavePath($filename);
            // unpersist and return the session from the file system
            return $this->unpersist($pathname);
        } catch (SessionDataNotReadableException $sdnre) {
            $this->delete($id);
        }
    }