Session
Methods
getName ( ) : string
Get the name of the session.
setName ( $name ) : void
Set the name of the session.
Parameters
- $name string
getId ( ) : string
Get the current session ID.
setId ( $id ) : void
Set the session ID.
Parameters
- $id string
start ( ) : bool
Start the session, reading the data from a handler.
save ( ) : void
Save the session data to storage.
all ( ) : array
Get all of the session data.
exists ( $key ) : bool
Checks if a key exists.
Parameters
- $key string|array
has ( $key ) : bool
Checks if a key is present and not null.
Parameters
- $key string|array
get ( $key , $default ) : mixed
Get an item from the session.
Parameters
- $key string
- $default mixed
pull ( $key , $default ) : mixed
Get the value of a given key and then forget it.
Parameters
- $key string
- $default mixed
put ( $key , $value ) : void
Put a key / value pair or array of key / value pairs in the session.
Parameters
- $key string|array
- $value mixed
token ( ) : string
Get the CSRF token value.
regenerateToken ( ) : void
Regenerate the CSRF token value.
remove ( $key ) : mixed
Remove an item from the session, returning its value.
Parameters
- $key string
forget ( $keys ) : void
Remove one or many items from the session.
Parameters
- $keys string|array
flush ( ) : void
Remove all of the items from the session.
invalidate ( ) : bool
Flush the session data and regenerate the ID.
regenerate ( $destroy ) : bool
Generate a new session identifier.
Parameters
- $destroy bool
migrate ( $destroy ) : bool
Generate a new session ID for the session.
Parameters
- $destroy bool
isStarted ( ) : bool
Determine if the session has been started.
previousUrl ( ) : string|null
Get the previous URL from the session.
setPreviousUrl ( $url ) : void
Set the "previous" URL in the session.
Parameters
- $url string
handlerNeedsRequest ( ) : bool
Determine if the session handler needs a request.
setRequestOnHandler ( $request ) : void
Set the request on the handler instance.
Parameters
- $request Request