SessionAwareWebApplicationTrait

Trait which helps implementing `Joomla\Application\SessionAwareWebApplicationInterface` in a web application class.

since

2.0.0

package

Joomla Framework

Methods

checkToken

Checks for a form token in the request.

checkToken( method = 'post') : 
since

2.0.0

Arguments

method

stringThe request method in which to look for the token key.

Response

bool

getFormToken

Method to determine a hash for anti-spoofing variable names

getFormToken( forceNew = false) : 
since

2.0.0

Arguments

forceNew

boolIf true, force a new token to be created

Response

stringHashed var name

getInput

Method to get the application input object.

getInput() : \Joomla\Input\Input
abstract
since

2.0.0

Response

Input

getSession

Method to get the application session object.

getSession() : \Joomla\Session\SessionInterface
since

2.0.0

Response

SessionInterfaceThe session object

setSession

Sets the session for the application to use, if required.

setSession(\Joomla\Session\SessionInterface session) : 
since

2.0.0

Arguments

session

SessionInterfaceA session object.

Response

$this

Properties

session

The application session object.

since

2.0.0

Type(s)

SessionInterface