diff options
author | Hugo Hamon <hugo.hamon@sensio.com> | 2012-05-01 13:13:14 +0100 |
---|---|---|
committer | Hugo Hamon <hugo.hamon@sensio.com> | 2012-05-01 13:13:14 +0100 |
commit | 47bc63f4b8b81e860b81810def22fed6dc7d8d1f (patch) | |
tree | c6bb5c93271785fda2779c08f495fa2c16f0faf4 /Core/Authentication/Token/AbstractToken.php | |
parent | 7542f0c0a86cb52a4242d8f960b214cb6245123b (diff) | |
download | symfony-security-47bc63f4b8b81e860b81810def22fed6dc7d8d1f.zip symfony-security-47bc63f4b8b81e860b81810def22fed6dc7d8d1f.tar.gz symfony-security-47bc63f4b8b81e860b81810def22fed6dc7d8d1f.tar.bz2 |
[Security] added some missing phpdoc for AbstractToken::setUser() and UsernamePasswordToken::__construct() methods.
Diffstat (limited to 'Core/Authentication/Token/AbstractToken.php')
-rw-r--r-- | Core/Authentication/Token/AbstractToken.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Core/Authentication/Token/AbstractToken.php b/Core/Authentication/Token/AbstractToken.php index dc21684..2cb355a 100644 --- a/Core/Authentication/Token/AbstractToken.php +++ b/Core/Authentication/Token/AbstractToken.php @@ -75,6 +75,15 @@ abstract class AbstractToken implements TokenInterface return $this->user; } + /** + * Sets the user into the token. + * + * The user can be a UserInterface instance, or an object implementing + * a __toString method or the username as a regular string. + * + * @param mixed $user The user + * @throws \InvalidArgumentException + */ public function setUser($user) { if (!($user instanceof UserInterface || (is_object($user) && method_exists($user, '__toString')) || is_string($user))) { |