Method | Description | |
---|---|---|
__construct ( array $roles = [] ) | Constructor. | |
__toString ( ) | ||
eraseCredentials ( ) | ||
getAttribute ( string $name ) : mixed | Returns an attribute value. | |
getAttributes ( ) : array | Returns the token attributes. | |
getRoles ( ) | ||
getUser ( ) | ||
getUsername ( ) | ||
hasAttribute ( string $name ) : boolean | Returns true if the attribute exists. | |
isAuthenticated ( ) | ||
serialize ( ) | ||
setAttribute ( string $name, mixed $value ) | Sets an attribute. | |
setAttributes ( array $attributes ) | Sets the token attributes. | |
setAuthenticated ( $authenticated ) | ||
setUser ( string | object $user ) | Sets the user in the token. | |
unserialize ( $serialized ) |
Method | Description | |
---|---|---|
hasUserChanged ( Symfony\Component\Security\Core\User\UserInterface $user ) |
public getAttribute ( string $name ) : mixed | ||
$name | string | The attribute name |
return | mixed | The attribute value |
public getAttributes ( ) : array | ||
return | array | The token attributes |
public hasAttribute ( string $name ) : boolean | ||
$name | string | The attribute name |
return | boolean | true if the attribute exists, false otherwise |
public setAttribute ( string $name, mixed $value ) | ||
$name | string | The attribute name |
$value | mixed | The attribute value |
public setAttributes ( array $attributes ) | ||
$attributes | array | The token attributes |