First Local Commit - After Clean up.
Signed-off-by: Rick Hays <rhays@haysgang.com>
This commit is contained in:
41
system/Encryption/Exceptions/EncryptionException.php
Normal file
41
system/Encryption/Exceptions/EncryptionException.php
Normal file
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
namespace CodeIgniter\Encryption\Exceptions;
|
||||
|
||||
use CodeIgniter\Exceptions\ExceptionInterface;
|
||||
|
||||
/**
|
||||
* Encryption exception
|
||||
*/
|
||||
class EncryptionException extends \RuntimeException implements ExceptionInterface
|
||||
{
|
||||
|
||||
public static function forNoDriverRequested()
|
||||
{
|
||||
return new static(lang('Encryption.noDriverRequested'));
|
||||
}
|
||||
|
||||
public static function forNoHandlerAvailable()
|
||||
{
|
||||
return new static(lang('Encryption.noHandlerAvailable'));
|
||||
}
|
||||
|
||||
public static function forUnKnownHandler(string $driver = null)
|
||||
{
|
||||
return new static(lang('Encryption.unKnownHandler', [$driver]));
|
||||
}
|
||||
|
||||
public static function forNeedsStarterKey()
|
||||
{
|
||||
return new static(lang('Encryption.starterKeyNeeded'));
|
||||
}
|
||||
|
||||
public static function forAuthenticationFailed()
|
||||
{
|
||||
return new static(lang('Encryption.authenticationFailed'));
|
||||
}
|
||||
public static function forEncryptionFailed()
|
||||
{
|
||||
return new static(lang('Encryption.encryptionFailed'));
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user