-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from bookboon/feature/initial-implementation
feat: model generation
- Loading branch information
Showing
49 changed files
with
8,110 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
.idea/ | ||
vendor/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"version":1,"defects":{"TestBasic::testBook":4,"Bookboon\\Tests\\TestBasic::testBook":4,"Bookboon\\Tests\\ApiModelsTest::testBook":4,"Bookboon\\ApiModels\\Tests\\ApiModelsTest::testBook":3,"Bookboon\\ApiModels\\Tests\\ApiModelsTest::testModels":4,"Bookboon\\ApiModels\\Tests\\ApiModelsTest::testThumbnails":5},"times":{"TestBasic::testBook":0.006,"Bookboon\\Tests\\TestBasic::testBook":0.005,"Bookboon\\Tests\\ApiModelsTest::testBook":0.005,"Bookboon\\ApiModels\\Tests\\ApiModelsTest::testBook":0.11,"Bookboon\\ApiModels\\Tests\\ApiModelsTest::testAuthor":0.303,"Bookboon\\ApiModels\\Tests\\ApiModelsTest::testModels":1.519,"Bookboon\\ApiModels\\Tests\\ApiModelsTest::testThumbnails":0.479}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?php | ||
|
||
namespace Bookboon\ApiModels; | ||
|
||
class AcademicBook extends Book | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<?php | ||
|
||
namespace Bookboon\ApiModels; | ||
|
||
class Advert | ||
{ | ||
protected string $id = ''; | ||
protected ?string $link = null; | ||
protected string $thumbnail = ''; | ||
|
||
public function setId(string $id): void | ||
{ | ||
$this->id = $id; | ||
} | ||
|
||
public function getId(): string | ||
{ | ||
return $this->id; | ||
} | ||
|
||
public function setLink(?string $link): void | ||
{ | ||
$this->link = $link; | ||
} | ||
|
||
public function getLink(): ?string | ||
{ | ||
return $this->link; | ||
} | ||
|
||
public function setThumbnail(string $thumbnail): void | ||
{ | ||
$this->thumbnail = $thumbnail; | ||
} | ||
|
||
public function getThumbnail(): string | ||
{ | ||
return $this->thumbnail; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?php | ||
|
||
namespace Bookboon\ApiModels; | ||
|
||
class Answer | ||
{ | ||
protected string $id = ''; | ||
protected string $text = ''; | ||
|
||
public function setId(string $id): void | ||
{ | ||
$this->id = $id; | ||
} | ||
|
||
public function getId(): string | ||
{ | ||
return $this->id; | ||
} | ||
|
||
public function setText(string $text): void | ||
{ | ||
$this->text = $text; | ||
} | ||
|
||
public function getText(): string | ||
{ | ||
return $this->text; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?php | ||
|
||
namespace Bookboon\ApiModels; | ||
|
||
class AttributeRequest | ||
{ | ||
protected string $name = ''; | ||
protected string $value = ''; | ||
|
||
public function setName(string $name): void | ||
{ | ||
$this->name = $name; | ||
} | ||
|
||
public function getName(): string | ||
{ | ||
return $this->name; | ||
} | ||
|
||
public function setValue(string $value): void | ||
{ | ||
$this->value = $value; | ||
} | ||
|
||
public function getValue(): string | ||
{ | ||
return $this->value; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?php | ||
|
||
namespace Bookboon\ApiModels; | ||
|
||
class AudioBook extends Book | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?php | ||
|
||
namespace Bookboon\ApiModels; | ||
|
||
class AudioTalkBook extends Book | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,144 @@ | ||
<?php | ||
|
||
namespace Bookboon\ApiModels; | ||
|
||
class Author | ||
{ | ||
protected string $id = ''; | ||
|
||
/** @var Book[]|null $books */ | ||
protected ?array $books = null; | ||
protected ?string $country = null; | ||
protected ?string $institution = null; | ||
protected ?string $linkedin = null; | ||
protected string $name = ''; | ||
protected ?string $profileText = null; | ||
|
||
/** @var Thumbnail[]|null $thumbnail */ | ||
protected ?array $thumbnail = null; | ||
protected string $title = ''; | ||
protected ?string $twitter = null; | ||
protected ?string $website = null; | ||
|
||
public function setId(string $id): void | ||
{ | ||
$this->id = $id; | ||
} | ||
|
||
public function getId(): string | ||
{ | ||
return $this->id; | ||
} | ||
|
||
/** | ||
* @param Book[]|null $books | ||
*/ | ||
public function setBooks(?array $books): void | ||
{ | ||
$this->books = $books; | ||
} | ||
|
||
/** | ||
* @return Book[]|null | ||
*/ | ||
public function getBooks(): ?array | ||
{ | ||
return $this->books; | ||
} | ||
|
||
public function setCountry(?string $country): void | ||
{ | ||
$this->country = $country; | ||
} | ||
|
||
public function getCountry(): ?string | ||
{ | ||
return $this->country; | ||
} | ||
|
||
public function setInstitution(?string $institution): void | ||
{ | ||
$this->institution = $institution; | ||
} | ||
|
||
public function getInstitution(): ?string | ||
{ | ||
return $this->institution; | ||
} | ||
|
||
public function setLinkedin(?string $linkedin): void | ||
{ | ||
$this->linkedin = $linkedin; | ||
} | ||
|
||
public function getLinkedin(): ?string | ||
{ | ||
return $this->linkedin; | ||
} | ||
|
||
public function setName(string $name): void | ||
{ | ||
$this->name = $name; | ||
} | ||
|
||
public function getName(): string | ||
{ | ||
return $this->name; | ||
} | ||
|
||
public function setProfileText(?string $profileText): void | ||
{ | ||
$this->profileText = $profileText; | ||
} | ||
|
||
public function getProfileText(): ?string | ||
{ | ||
return $this->profileText; | ||
} | ||
|
||
/** | ||
* @param Thumbnail[]|null $thumbnail | ||
*/ | ||
public function setThumbnail(?array $thumbnail): void | ||
{ | ||
$this->thumbnail = $thumbnail; | ||
} | ||
|
||
/** | ||
* @return Thumbnail[]|null | ||
*/ | ||
public function getThumbnail(): ?array | ||
{ | ||
return $this->thumbnail; | ||
} | ||
|
||
public function setTitle(string $title): void | ||
{ | ||
$this->title = $title; | ||
} | ||
|
||
public function getTitle(): string | ||
{ | ||
return $this->title; | ||
} | ||
|
||
public function setTwitter(?string $twitter): void | ||
{ | ||
$this->twitter = $twitter; | ||
} | ||
|
||
public function getTwitter(): ?string | ||
{ | ||
return $this->twitter; | ||
} | ||
|
||
public function setWebsite(?string $website): void | ||
{ | ||
$this->website = $website; | ||
} | ||
|
||
public function getWebsite(): ?string | ||
{ | ||
return $this->website; | ||
} | ||
} |
Oops, something went wrong.