[Security] Add custom getMessageKey AccountStatusException childs

This commit is contained in:
Alexander 2012-07-15 15:41:08 +02:00
parent 1147977212
commit 50e2cfc1f5
4 changed files with 32 additions and 0 deletions

View File

@ -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';
}
}

View File

@ -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';
}
}

View File

@ -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';
}
}

View File

@ -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';
}
}