Add cover art database

Co-authored-by: Job Curtis <job.curtis@gmail.com>
Co-authored-by: Alex Cabal <alex@standardebooks.org>
This commit is contained in:
Mike Colagrosso 2023-12-28 16:38:39 -06:00 committed by Alex Cabal
parent 74f747df76
commit 6a5c05511a
92 changed files with 3174 additions and 146 deletions

View file

@ -0,0 +1,6 @@
<?
namespace Exceptions;
class ArtistNameRequiredException extends AppException{
protected $message = 'An artist name is required.';
}

View file

@ -0,0 +1,6 @@
<?
namespace Exceptions;
class ArtworkAlreadyExistsException extends AppException{
protected $message = 'An artwork with this name already exists.';
}

View file

@ -0,0 +1,6 @@
<?
namespace Exceptions;
class ArtworkNameRequiredException extends AppException{
protected $message = 'An artwork name is required.';
}

View file

@ -0,0 +1,6 @@
<?
namespace Exceptions;
class ArtworkNotFoundException extends AppException{
protected $message = 'We couldnt locate that artwork.';
}

View file

@ -0,0 +1,6 @@
<?
namespace Exceptions;
class InvalidArtistException extends AppException{
protected $message = 'We couldnt locate that artist.';
}

View file

@ -0,0 +1,6 @@
<?
namespace Exceptions;
class InvalidArtworkException extends AppException{
protected $message = 'Artwork is invalid.';
}

View file

@ -0,0 +1,6 @@
<?
namespace Exceptions;
class InvalidArtworkPageUrlException extends AppException{
protected $message = 'Invalid link to page with artwork.';
}

View file

@ -0,0 +1,5 @@
<?
namespace Exceptions;
class InvalidArtworkTagException extends AppException{
}

View file

@ -0,0 +1,6 @@
<?
namespace Exceptions;
class InvalidCompletedYearException extends AppException{
protected $message = 'Invalid year of completion.';
}

View file

@ -0,0 +1,6 @@
<?
namespace Exceptions;
class InvalidCopyrightPageUrlException extends AppException{
protected $message = 'Invalid link to page with copyright details.';
}

View file

@ -0,0 +1,6 @@
<?
namespace Exceptions;
class InvalidDeathYearException extends AppException{
protected $message = 'Invalid year of death.';
}

View file

@ -0,0 +1,7 @@
<?php
namespace Exceptions;
class InvalidImageUploadException extends AppException{
protected $message = 'Uploaded image is invalid.';
}

View file

@ -0,0 +1,7 @@
<?php
namespace Exceptions;
class InvalidMimeTypeException extends AppException{
protected $message = 'Uploaded image must be a JPG, BMP, PNG, or TIFF file.';
}

View file

@ -0,0 +1,6 @@
<?
namespace Exceptions;
class InvalidMuseumUrlException extends AppException{
protected $message = 'Invalid link to an approved museum page.';
}

View file

@ -0,0 +1,6 @@
<?
namespace Exceptions;
class InvalidPublicationYearException extends AppException{
protected $message = 'Invalid year of publication.';
}

View file

@ -0,0 +1,6 @@
<?
namespace Exceptions;
class InvalidPublicationYearPageUrlException extends AppException{
protected $message = 'Invalid link to page with year of publication.';
}

View file

@ -2,5 +2,5 @@
namespace Exceptions;
class InvalidRequestException extends AppException{
protected $message = 'Invalid request.';
protected $message = 'Invalid HTTP request.';
}

View file

@ -0,0 +1,6 @@
<?
namespace Exceptions;
class MissingEbookException extends AppException{
protected $message = 'Artwork marked as “in use”, but the ebook couldnt be found in the filesystem.';
}

View file

@ -0,0 +1,6 @@
<?
namespace Exceptions;
class MissingPdProofException extends AppException{
protected $message = 'Missing proof of U.S. public domain status.';
}

View file

@ -0,0 +1,11 @@
<?
namespace Exceptions;
class StringTooLongException extends AppException{
public $Source;
public function __construct(string $source = ''){
$this->Source = $source;
parent::__construct('String too long: ' . $source);
}
}

View file

@ -0,0 +1,6 @@
<?
namespace Exceptions;
class TagsRequiredException extends AppException{
protected $message = 'At least one tag is required.';
}

View file

@ -0,0 +1,6 @@
<?
namespace Exceptions;
class TooManyTagsException extends AppException{
protected $message = 'Too many tags; the maximum is ' . COVER_ARTWORK_MAX_TAGS . '.';
}