Methods summary
public
|
|
public
|
#
start( )
Starts and initializes session data.
Starts and initializes session data.
Throws
|
public
boolean
|
#
isStarted( )
Has been session started?
Has been session started?
Returns
boolean bool
|
public
|
#
close( )
Ends the current session and store session data.
Ends the current session and store session data.
|
public
|
#
destroy( )
Destroys all data registered to a session.
Destroys all data registered to a session.
|
public
boolean
|
#
exists( )
Does session exists for the current request?
Does session exists for the current request?
Returns
boolean bool
|
public
|
#
regenerateId( )
Regenerates the session ID.
Regenerates the session ID.
Throws
|
public
string
|
#
getId( )
Returns the current session ID. Don't make dependencies, can be changed for
each request.
Returns the current session ID. Don't make dependencies, can be changed for
each request.
Returns
string string
|
public
Nette\Http\Session
|
#
setName( string $name )
Sets the session name to a specified one.
Sets the session name to a specified one.
Parameters
Returns
|
public
string
|
#
getName( )
Gets the session name.
Returns
string string
|
public
Nette\Http\SessionSection
|
#
getSection( string $section, string $class = SessionSection::class )
Returns specified session section.
Returns specified session section.
Parameters
Returns
Throws
|
public
boolean
|
#
hasSection( string $section )
Checks if a session section exist and is not empty.
Checks if a session section exist and is not empty.
Parameters
Returns
boolean bool
|
public
Iterator
|
#
getIterator( )
Iteration over all sections.
Iteration over all sections.
Returns
|
public
|
#
clean( )
Cleans and minimizes meta structures. This method is called automatically on
shutdown, do not call it directly.
Cleans and minimizes meta structures. This method is called automatically on
shutdown, do not call it directly.
Internal
|
public
Nette\Http\Session
|
#
setOptions( array $options )
Sets session options.
Parameters
Returns
Throws
|
public
array
|
#
getOptions( )
Returns all session options.
Returns all session options.
Returns
array array
|
public
Nette\Http\Session
|
#
setExpiration( string|integer|DateTimeInterface $time )
Sets the amount of time allowed between requests before the session will be
terminated.
Sets the amount of time allowed between requests before the session will be
terminated.
Parameters
- $time
- value 0 means "until the browser is closed"
Returns
|
public
Nette\Http\Session
|
#
setCookieParameters( string $path, string $domain = null, boolean $secure = null, string $samesite = null )
Sets the session cookie parameters.
Sets the session cookie parameters.
Parameters
- $path
- path
- $domain
- domain
- $secure
- secure
- $samesite
- samesite
Returns
|
public
array
|
#
getCookieParameters( )
Returns the session cookie parameters.
Returns the session cookie parameters.
Returns
array containing items: lifetime, path, domain, secure, httponly
|
public
Nette\Http\Session
|
#
setSavePath( $path )
Sets path of the directory used to save session data.
Sets path of the directory used to save session data.
Returns
|
public
Nette\Http\Session
|
|
public
Nette\Http\Session
|
|