GlobalVariables
class GlobalVariables
GlobalVariables is the entry point for Symfony global variables in PHP templates.
Methods
__construct(ContainerInterface $container) | ||
TokenInterface|null | getToken() | |
getUser() | ||
Request|null | getRequest() | |
Session|null | getSession() | |
string | getEnvironment() | |
bool | getDebug() |
Details
__construct(ContainerInterface $container)
Parameters
ContainerInterface | $container |
TokenInterface|null getToken()
Return Value
TokenInterface|null |
getUser()
Request|null getRequest()
Return Value
Request|null | The HTTP request object |
Session|null getSession()
Return Value
Session|null | The session |
string getEnvironment()
Return Value
string | The current environment string (e.g 'dev') |
bool getDebug()
Return Value
bool | The current debug mode |
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/4.0/Symfony/Bundle/FrameworkBundle/Templating/GlobalVariables.html