mirror of
https://github.com/standardebooks/web.git
synced 2025-07-14 10:31:59 -04:00
Convert SOURCE_ constants to an enum
This commit is contained in:
parent
3606a5c425
commit
09b4385100
4 changed files with 41 additions and 39 deletions
|
@ -1,9 +1,21 @@
|
|||
<?
|
||||
enum EbookSourceType{
|
||||
case ProjectGutenberg;
|
||||
case ProjectGutenbergAustralia;
|
||||
case ProjectGutenbergCanada;
|
||||
case InternetArchive;
|
||||
case HathiTrust;
|
||||
case Wikisource;
|
||||
case GoogleBooks;
|
||||
case FadedPage;
|
||||
case Other;
|
||||
}
|
||||
|
||||
class EbookSource{
|
||||
public int $Type;
|
||||
public EbookSourceType $Type;
|
||||
public string $Url;
|
||||
|
||||
public function __construct(int $type, string $url){
|
||||
public function __construct(EbookSourceType $type, string $url){
|
||||
$this->Type = $type;
|
||||
$this->Url = $url;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue