CodeIgniter4/system/Exceptions/DownloadException.php
ytetsuro fa7d8ff9ae
feat: add DownloadException.
Signed-off-by: ytetsuro <phper.0o0@gmail.com>
2018-10-05 02:02:52 +09:00

27 lines
578 B
PHP

<?php namespace CodeIgniter\Exceptions;
/**
* Class DownloadException
*
* @package CodeIgniter\Exceptions
*/
class DownloadException extends \RuntimeException implements ExceptionInterface
{
public static function forCannotSetFilePath(string $path)
{
return new static(lang('HTTP.cannotSetFilePath', [$path]));
}
public static function forCannotSetBinary()
{
return new static(lang('HTTP.cannotSetBinary'));
}
public static function forNotFoundDownloadSource(string $extension)
{
return new static(lang('HTTP.notFoundDownloadSource', [$extension]));
}
}