Add a CollectionMembership class

This commit is contained in:
Mike Colagrosso 2024-06-25 16:26:36 -06:00 committed by Alex Cabal
parent a25660bc8b
commit ee29c526f8
7 changed files with 184 additions and 62 deletions

View 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);
}
}