Templating\GlobalVariables (Bundle\FrameworkBundle)
Symfony\Bundle\FrameworkBundle\Templating\GlobalVariables
class GlobalVariables
GlobalVariables is the entry point for Symfony global variables in PHP templates.
Methods
__construct(ContainerInterface $container) | ||
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
public __construct(ContainerInterface $container)
public mixed getUser()
Returns the current user.
public Request|null getRequest()
Returns the current request.
public Session|null getSession()
Returns the current session.
public string getEnvironment()
Returns the current app environment.
public bool getDebug()
Returns the current app debug mode.
© 2004–2016 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/3.0/Symfony/Bundle/FrameworkBundle/Templating/GlobalVariables.html