mirror of
https://github.com/codeigniter4/CodeIgniter4.git
synced 2025-02-20 11:44:28 +08:00
27 lines
578 B
PHP
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]));
|
|
}
|
|
|
|
}
|