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

__construct(ContainerInterface $container)

Parameters

ContainerInterface $container The DI container

mixed getUser()

Returns the current user.

Return Value

mixed

See also

TokenInterface::getUser()

Request|null getRequest()

Returns the current request.

Return Value

Request|null The HTTP request object

Session|null getSession()

Returns the current session.

Return Value

Session|null The session

string getEnvironment()

Returns the current app environment.

Return Value

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

bool getDebug()

Returns the current app debug mode.

Return Value

bool The current debug mode
doc_Symfony
2016-10-28 06:19:57
Comments
Leave a Comment

Please login to continue.