diff options
author | Fabien Potencier <fabien.potencier@gmail.com> | 2010-10-22 15:19:13 +0200 |
---|---|---|
committer | Fabien Potencier <fabien.potencier@gmail.com> | 2010-10-22 15:19:13 +0200 |
commit | f7ba6da23e50d09fe7061778730e07cefccc0fdd (patch) | |
tree | 08fa6c375c3673d34857e64f3b0b484a28e48f45 | |
parent | 89174563c47a0ec86ac39aaa480df6ab404288f1 (diff) | |
download | symfony-security-f7ba6da23e50d09fe7061778730e07cefccc0fdd.zip symfony-security-f7ba6da23e50d09fe7061778730e07cefccc0fdd.tar.gz symfony-security-f7ba6da23e50d09fe7061778730e07cefccc0fdd.tar.bz2 |
[Security] removed type hint in AuthenticationException as the extra information can be of different classes
-rw-r--r-- | Exception/AuthenticationException.php | 16 | ||||
-rw-r--r-- | User/InMemoryUserProvider.php | 2 |
2 files changed, 8 insertions, 10 deletions
diff --git a/Exception/AuthenticationException.php b/Exception/AuthenticationException.php index 939139b..3d03376 100644 --- a/Exception/AuthenticationException.php +++ b/Exception/AuthenticationException.php @@ -2,8 +2,6 @@ namespace Symfony\Component\Security\Exception; -use Symfony\Component\Security\Authentication\Token\TokenInterface; - /* * This file is part of the Symfony package. * @@ -20,22 +18,22 @@ use Symfony\Component\Security\Authentication\Token\TokenInterface; */ class AuthenticationException extends \RuntimeException { - protected $token; + protected $extraInformation; - public function __construct($message, TokenInterface $token = null, $code = 0, \Exception $previous = null) + public function __construct($message, $extraInformation = null, $code = 0, \Exception $previous = null) { parent::__construct($message, $code, $previous); - $this->token = $token; + $this->extraInformation = $extraInformation; } - public function getToken() + public function getExtraInformation() { - return $this->token; + return $this->extraInformation; } - public function setToken(TokenInterface $token) + public function setExtraInformation($extraInformation) { - $this->token = $token; + $this->extraInformation = $extraInformation; } } diff --git a/User/InMemoryUserProvider.php b/User/InMemoryUserProvider.php index 6e1febe..fd90b36 100644 --- a/User/InMemoryUserProvider.php +++ b/User/InMemoryUserProvider.php @@ -30,7 +30,7 @@ class InMemoryUserProvider implements UserProviderInterface /** * Constructor. * - * The user array is hash where the keys are usernames and the values are + * The user array is a hash where the keys are usernames and the values are * an array of attributes: 'password', 'enabled', and 'roles'. * * @param array $users An array of users |