mirror of
https://github.com/standardebooks/web.git
synced 2025-07-06 23:00:28 -04:00
Add a CollectionMembership class
This commit is contained in:
parent
a25660bc8b
commit
ee29c526f8
7 changed files with 184 additions and 62 deletions
16
lib/Exceptions/InvalidCollectionTypeException.php
Normal file
16
lib/Exceptions/InvalidCollectionTypeException.php
Normal file
|
@ -0,0 +1,16 @@
|
|||
<?php
|
||||
|
||||
namespace Exceptions;
|
||||
|
||||
class InvalidCollectionTypeException extends AppException{
|
||||
/** @var string $message */
|
||||
protected $message = 'Collection type should be `series` or `set` according to the EPUB specification.';
|
||||
|
||||
public function __construct(?string $collectionType){
|
||||
if($collectionType !== null && trim($collectionType) != ''){
|
||||
$this->message .= ' Type provided: ' . $collectionType;
|
||||
}
|
||||
|
||||
parent::__construct($this->message);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue