class SecurityDataCollector extends DataCollector

SecurityDataCollector.

Methods

serialize()

No description

unserialize($data)

No description

__construct(TokenStorageInterface $tokenStorage = null, RoleHierarchyInterface $roleHierarchy = null, LogoutUrlGenerator $logoutUrlGenerator = null)

Constructor.

collect(Request $request, Response $response, Exception $exception = null)

Collects data for the given Request and Response.

bool
isEnabled()

Checks if security is enabled.

string
getUser()

Gets the user.

array
getRoles()

Gets the roles of the user.

array
getInheritedRoles()

Gets the inherited roles of the user.

bool
supportsRoleHierarchy()

Checks if the data contains information about inherited roles. Still the inherited roles can be an empty array.

bool
isAuthenticated()

Checks if the user is authenticated or not.

string
getTokenClass()

Get the class name of the security token.

string
getLogoutUrl()

Get the provider key (i.e. the name of the active firewall).

string
getName()

Returns the name of the collector.

Details

in DataCollector at line line 33
serialize()

in DataCollector at line line 38
unserialize($data)

Parameters

$data

at line line 40
__construct(TokenStorageInterface $tokenStorage = null, RoleHierarchyInterface $roleHierarchy = null, LogoutUrlGenerator $logoutUrlGenerator = null)

Constructor.

Parameters

TokenStorageInterface $tokenStorage
RoleHierarchyInterface $roleHierarchy
LogoutUrlGenerator $logoutUrlGenerator

at line line 50
collect(Request $request, Response $response, Exception $exception = null)

Collects data for the given Request and Response.

Parameters

Request $request A Request instance
Response $response A Response instance
Exception $exception An Exception instance

at line line 114
bool isEnabled()

Checks if security is enabled.

Return Value

bool true if security is enabled, false otherwise

at line line 124
string getUser()

Gets the user.

Return Value

string The user

at line line 134
array getRoles()

Gets the roles of the user.

Return Value

array The roles

at line line 144
array getInheritedRoles()

Gets the inherited roles of the user.

Return Value

array The inherited roles

at line line 155
bool supportsRoleHierarchy()

Checks if the data contains information about inherited roles. Still the inherited roles can be an empty array.

Return Value

bool true if the profile was contains inherited role information.

at line line 165
bool isAuthenticated()

Checks if the user is authenticated or not.

Return Value

bool true if the user is authenticated, false otherwise

at line line 175
string getTokenClass()

Get the class name of the security token.

Return Value

string The token

at line line 185
string getLogoutUrl()

Get the provider key (i.e. the name of the active firewall).

Return Value

string The provider key

at line line 193
string getName()

Returns the name of the collector.

Return Value

string The collector name