class AppVariable

Exposes some Symfony parameters and services as an "app" global variable.

Methods

setTokenStorage(TokenStorageInterface $tokenStorage)

No description

setRequestStack(RequestStack $requestStack)

No description

setEnvironment($environment)

No description

setDebug($debug)

No description

mixed
getUser()

Returns the current user.

Request|null
getRequest()

Returns the current request.

Session|null
getSession()

Returns the current session.

string
getEnvironment()

Returns the current app environment.

bool
getDebug()

Returns the current app debug mode.

Details

at line line 31
setTokenStorage(TokenStorageInterface $tokenStorage)

Parameters

TokenStorageInterface $tokenStorage

at line line 36
setRequestStack(RequestStack $requestStack)

Parameters

RequestStack $requestStack

at line line 41
setEnvironment($environment)

Parameters

$environment

at line line 46
setDebug($debug)

Parameters

$debug

at line line 58
mixed getUser()

Returns the current user.

Return Value

mixed

See also

TokenInterface::getUser()

at line line 81
Request|null getRequest()

Returns the current request.

Return Value

Request|null The HTTP request object

at line line 95
Session|null getSession()

Returns the current session.

Return Value

Session|null The session

at line line 111
string getEnvironment()

Returns the current app environment.

Return Value

string The current environment string (e.g 'dev')

at line line 125
bool getDebug()

Returns the current app debug mode.

Return Value

bool The current debug mode