mirror of
https://github.com/standardebooks/web.git
synced 2025-07-08 07:40:39 -04:00
Add PropertyFromHttp trait and update codebase to use new pattern
This commit is contained in:
parent
c35c47b793
commit
acb30b897c
47 changed files with 851 additions and 527 deletions
|
@ -3,18 +3,20 @@
|
|||
use Safe\DateTimeImmutable;
|
||||
|
||||
class EbookSource{
|
||||
public ?int $EbookId = null;
|
||||
public int $EbookId;
|
||||
public Enums\EbookSourceType $Type;
|
||||
public string $Url;
|
||||
public ?int $SortOrder = null;
|
||||
public int $SortOrder;
|
||||
|
||||
|
||||
// *******
|
||||
// METHODS
|
||||
// *******
|
||||
|
||||
/**
|
||||
* @throws Exceptions\ValidationException
|
||||
*/
|
||||
public function Validate(): void{
|
||||
/** @throws void */
|
||||
$now = new DateTimeImmutable();
|
||||
|
||||
$error = new Exceptions\ValidationException();
|
||||
|
||||
if(!isset($this->EbookId)){
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue