Alex Cabal
acb30b897c
Add PropertyFromHttp trait and update codebase to use new pattern
2024-11-10 22:23:43 -06:00
Mike Colagrosso
85307a7c7e
Standardize trim and other validation of nullable and non-nullable properties
2024-11-04 13:16:56 -06:00
Mike Colagrosso
754fc0ab2b
LocSubject: Trim Name and validate Name isn't empty
2024-11-04 13:16:56 -06:00
Mike Colagrosso
4d321061c5
Use ::class names instead of strings in LocSubject and EbookTag
2024-11-04 13:16:56 -06:00
Mike Colagrosso
2098b265a8
Rename the constructor Ebook::__construct()
to static Ebook::FromFilesystem()
...
Also added `GetFoo()` methods for all the derived properties like `GetUrl()`, `GetHasDownloads()`, etc. Removed that logic from the constructor so that it's reusable in `Ebook::FromFilesystem()` and `Ebook::GetByIdentifier()`
2024-11-04 13:16:56 -06:00
Mike Colagrosso
dc62553269
Remove leading slash from exceptions in lib/Exceptions
2024-11-04 13:16:56 -06:00
Mike Colagrosso
72d679a04f
Fix PHPStan errors
2024-11-04 13:16:56 -06:00
Mike Colagrosso
cc8de11ca4
Replace static GetOrCreate with GetByNameOrCreate
2024-11-04 13:16:56 -06:00
Mike Colagrosso
4a1a4efb24
Don't redine Name in LocSubject, already in Tag
2024-11-04 13:16:56 -06:00
Mike Colagrosso
63d411a2e6
Initial code changes to insert/update Ebook records
2024-11-04 13:16:56 -06:00