mediatekformation

AppVariable
in package

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

Tags
author

Fabien Potencier fabien@symfony.com

Table of Contents

$debug  : mixed
$environment  : mixed
$requestStack  : mixed
$tokenStorage  : mixed
getDebug()  : bool
Returns the current app debug mode.
getEnvironment()  : string
Returns the current app environment.
getFlashes()  : array<string|int, mixed>
Returns some or all the existing flash messages: * getFlashes() returns all the flash messages * getFlashes('notice') returns a simple array with flash messages of that type * getFlashes(['notice', 'error']) returns a nested array of type => messages.
getRequest()  : Request|null
Returns the current request.
getSession()  : Session|null
Returns the current session.
getToken()  : TokenInterface|null
Returns the current token.
getUser()  : object|null
Returns the current user.
setDebug()  : mixed
setEnvironment()  : mixed
setRequestStack()  : mixed
setTokenStorage()  : mixed

Properties

Methods

getDebug()

Returns the current app debug mode.

public getDebug() : bool
Return values
bool

The current debug mode

getEnvironment()

Returns the current app environment.

public getEnvironment() : string
Return values
string

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

getFlashes()

Returns some or all the existing flash messages: * getFlashes() returns all the flash messages * getFlashes('notice') returns a simple array with flash messages of that type * getFlashes(['notice', 'error']) returns a nested array of type => messages.

public getFlashes([mixed $types = null ]) : array<string|int, mixed>
Parameters
$types : mixed = null
Return values
array<string|int, mixed>

getRequest()

Returns the current request.

public getRequest() : Request|null
Return values
Request|null

The HTTP request object

setDebug()

public setDebug(mixed $debug) : mixed
Parameters
$debug : mixed
Return values
mixed

setEnvironment()

public setEnvironment(mixed $environment) : mixed
Parameters
$environment : mixed
Return values
mixed

Search results