class SecurityDataCollector extends DataCollector implements LateDataCollectorInterface
protected | $data | from DataCollector |
serialize() | from DataCollector | |
unserialize($data) | from DataCollector | |
Data | cloneVar(mixed $var) Converts the variable into a serializable Data instance. | from DataCollector |
callable[] | getCasters() | from DataCollector |
__construct(TokenStorageInterface $tokenStorage = null, RoleHierarchyInterface $roleHierarchy = null, LogoutUrlGenerator $logoutUrlGenerator = null, AccessDecisionManagerInterface $accessDecisionManager = null, FirewallMapInterface $firewallMap = null, TraceableFirewallListener $firewall = null) | ||
collect(Request $request, Response $response, Exception $exception = null) Collects data for the given Request and Response. | ||
reset() Resets this data collector to its initial state. | ||
lateCollect() Collects data as late as possible. | ||
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. | |
isImpersonated() | ||
getImpersonatorUser() | ||
getImpersonationExitPath() | ||
string | getTokenClass() Get the class name of the security token. | |
Data | getToken() Get the full security token class as Data object. | |
string | getLogoutUrl() Get the logout URL. | |
string[] | getVoters() Returns the FQCN of the security voters enabled in the application. | |
string | getVoterStrategy() Returns the strategy configured for the security voters. | |
array | getAccessDecisionLog() Returns the log of the security decisions made by the access decision manager. | |
array | getFirewall() Returns the configuration of the current firewall context. | |
getListeners() | ||
string | getName() Returns the name of the collector. |
$data |
Converts the variable into a serializable Data instance.
This array can be displayed in the template using the VarDumper component.
mixed | $var |
Data |
callable[] | The casters to add to the cloner |
TokenStorageInterface | $tokenStorage | |
RoleHierarchyInterface | $roleHierarchy | |
LogoutUrlGenerator | $logoutUrlGenerator | |
AccessDecisionManagerInterface | $accessDecisionManager | |
FirewallMapInterface | $firewallMap | |
TraceableFirewallListener | $firewall |
Collects data for the given Request and Response.
Request | $request | |
Response | $response | |
Exception | $exception |
Resets this data collector to its initial state.
Collects data as late as possible.
Checks if security is enabled.
bool | true if security is enabled, false otherwise |
Gets the user.
string | The user |
Gets the roles of the user.
array | The roles |
Gets the inherited roles of the user.
array | The inherited roles |
Checks if the data contains information about inherited roles. Still the inherited roles can be an empty array.
bool | true if the profile was contains inherited role information |
Checks if the user is authenticated or not.
bool | true if the user is authenticated, false otherwise |
Get the class name of the security token.
string | The token |
Get the full security token class as Data object.
Data |
Get the logout URL.
string | The logout URL |
Returns the FQCN of the security voters enabled in the application.
string[] |
Returns the strategy configured for the security voters.
string |
Returns the log of the security decisions made by the access decision manager.
array |
Returns the configuration of the current firewall context.
array |
Returns the name of the collector.
string | The collector name |
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
https://api.symfony.com/4.1/Symfony/Bundle/SecurityBundle/DataCollector/SecurityDataCollector.html