public static function emptyInstance() { // extract the values $id = null; $name = 'empty'; $lifetime = -1; $maximumAge = -1; $domain = ''; $path = ''; $secure = false; $httpOnly = false; // initialize and return the empty instance return new Session($id, $name, $lifetime, $maximumAge, $domain, $path, $secure, $httpOnly); }
/** * Initializes the session instance from the passed JSON string. If the encoded * data contains objects, they will be unserialized before reattached to the * session instance. * * @param string $marshalled The marshaled session representation * * @return \AppserverIo\Psr\Servlet\ServletSessionInterface The un-marshaled servlet session instance */ protected function unmarshall($marshalled) { // create a new and empty servlet session instance $servletSession = Session::emptyInstance(); // unmarshall the session data $this->getSessionMarshaller()->unmarshall($servletSession, $marshalled); // returns the initialized servlet session instance return $servletSession; }