Represents a browser session.
Sessions persist between HTTP requests for a single browser session. They are deleted when the browser is closed, or they time-out. Session cookies are used to maintain sessions using a secure UUID.
Sessions can be used to maintain data for a browser session, e.g. a shopping basket.
The context must have first been routed to a @see \io\vertx\jphp\ext\web\handler\SessionHandler for sessions to be available.
package |
Default |
---|
__construct()
destroy() : void
get( $arg0) : mixed
string
mixed
the data
id() : string
string
The unique ID of the session. This is generated using a random secure UUID.
isDestroyed() : boolean
boolean
has the session been destroyed?
isEmpty() : boolean
boolean
true if the session has data
isRegenerated() : boolean
boolean
has the session been renewed?
lastAccessed() : integer
integer
the time the session was last accessed
oldId() : string
string
old ID if renewed
put( $arg0, $arg1) : $this
string
mixed
$this
a reference to this, so the API can be used fluently
regenerateId() : \io\vertx\jphp\ext\web\Session
remove( $arg0) : mixed
string
mixed
the data that was there or null if none there
setAccessed() : void
timeout() : integer
integer
the amount of time in ms, after which the session will expire, if not accessed.
value() : string
string
short representation string.