diff options
author | Alexander <iam.asm89@gmail.com> | 2012-07-15 15:41:08 +0200 |
---|---|---|
committer | Alexander <iam.asm89@gmail.com> | 2013-01-07 20:58:58 +0100 |
commit | af4eedf60155804455d3abf68ee9720ef7dca5d4 (patch) | |
tree | f39d66e26522699f78fef38af20b3ba463132803 /Core/Exception | |
parent | 924552dccf20ff29dc56c203458f53e86a11734a (diff) | |
download | symfony-security-af4eedf60155804455d3abf68ee9720ef7dca5d4.zip symfony-security-af4eedf60155804455d3abf68ee9720ef7dca5d4.tar.gz symfony-security-af4eedf60155804455d3abf68ee9720ef7dca5d4.tar.bz2 |
[Security] Add custom `getMessageKey` AccountStatusException childs
Diffstat (limited to 'Core/Exception')
-rw-r--r-- | Core/Exception/AccountExpiredException.php | 8 | ||||
-rw-r--r-- | Core/Exception/CredentialsExpiredException.php | 8 | ||||
-rw-r--r-- | Core/Exception/DisabledException.php | 8 | ||||
-rw-r--r-- | Core/Exception/LockedException.php | 8 |
4 files changed, 32 insertions, 0 deletions
diff --git a/Core/Exception/AccountExpiredException.php b/Core/Exception/AccountExpiredException.php index f899b1b..5a3bd50 100644 --- a/Core/Exception/AccountExpiredException.php +++ b/Core/Exception/AccountExpiredException.php @@ -15,7 +15,15 @@ namespace Symfony\Component\Security\Core\Exception; * AccountExpiredException is thrown when the user account has expired. * * @author Fabien Potencier <fabien@symfony.com> + * @author Alexander <iam.asm89@gmail.com> */ class AccountExpiredException extends AccountStatusException { + /** + * {@inheritDoc} + */ + public function getMessageKey() + { + return 'security.exception.account_expired_exception'; + } } diff --git a/Core/Exception/CredentialsExpiredException.php b/Core/Exception/CredentialsExpiredException.php index a4d42c8..03f96c3 100644 --- a/Core/Exception/CredentialsExpiredException.php +++ b/Core/Exception/CredentialsExpiredException.php @@ -15,7 +15,15 @@ namespace Symfony\Component\Security\Core\Exception; * CredentialsExpiredException is thrown when the user account credentials have expired. * * @author Fabien Potencier <fabien@symfony.com> + * @author Alexander <iam.asm89@gmail.com> */ class CredentialsExpiredException extends AccountStatusException { + /** + * {@inheritDoc} + */ + public function getMessageKey() + { + return 'security.exception.credentials_expired_exception'; + } } diff --git a/Core/Exception/DisabledException.php b/Core/Exception/DisabledException.php index fd26221..feb0609 100644 --- a/Core/Exception/DisabledException.php +++ b/Core/Exception/DisabledException.php @@ -15,7 +15,15 @@ namespace Symfony\Component\Security\Core\Exception; * DisabledException is thrown when the user account is disabled. * * @author Fabien Potencier <fabien@symfony.com> + * @author Alexander <iam.asm89@gmail.com> */ class DisabledException extends AccountStatusException { + /** + * {@inheritDoc} + */ + public function getMessageKey() + { + return 'security.exception.disabled_exception'; + } } diff --git a/Core/Exception/LockedException.php b/Core/Exception/LockedException.php index 6fa0b77..f185a02 100644 --- a/Core/Exception/LockedException.php +++ b/Core/Exception/LockedException.php @@ -15,7 +15,15 @@ namespace Symfony\Component\Security\Core\Exception; * LockedException is thrown if the user account is locked. * * @author Fabien Potencier <fabien@symfony.com> + * @author Alexander <iam.asm89@gmail.com> */ class LockedException extends AccountStatusException { + /** + * {@inheritDoc} + */ + public function getMessageKey() + { + return 'security.exception.locked_exception'; + } } |