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(string method = 'post') : bool
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(bool forceNew = false) : string
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

\Joomla\Input\Input

getSession

Method to get the application session object.

getSession() : \Joomla\Session\SessionInterface
since

2.0.0

Response

\Joomla\Session\SessionInterfaceThe session object

setSession

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

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

2.0.0

Arguments

session

\Joomla\Session\SessionInterfaceA session object.

Response

$this

Properties

session

The application session object.

since

2.0.0

Type(s)

\Joomla\Session\SessionInterface