-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1239 from ytetsuro/change-testable-download
【Unsolicited PR】I changed the download method to testable.
- Loading branch information
Showing
9 changed files
with
798 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?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() | ||
{ | ||
return new static(lang('HTTP.notFoundDownloadSource')); | ||
} | ||
|
||
public static function forCannotSetCache() | ||
{ | ||
return new static(lang('HTTP.cannotSetCache')); | ||
} | ||
|
||
public static function forCannotSetStatusCode(int $code, string $reason) | ||
{ | ||
return new static(lang('HTTP.cannotSetStatusCode', [$code, $reason])); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.