mirror of
https://github.com/standardebooks/web.git
synced 2025-07-18 04:16:38 -04:00
Make collection type (series, set) an enum
This commit is contained in:
parent
d3b7f5015a
commit
b792dec9e5
4 changed files with 10 additions and 4 deletions
|
@ -762,7 +762,7 @@ class Ebook{
|
|||
$cm->SequenceNumber = (int)$s;
|
||||
}
|
||||
foreach($xml->xpath('/package/metadata/meta[@refines="#' . $id . '"][@property="collection-type"]') ?: [] as $s){
|
||||
$cm->Collection->Type = (string)$s;
|
||||
$cm->Collection->Type = CollectionType::tryFrom((string)$s) ?? CollectionType::Unknown;
|
||||
}
|
||||
$collectionMemberships[] = $cm;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue