Skip to content

Commit

Permalink
Merge pull request #1 from bookboon/feature/initial-implementation
Browse files Browse the repository at this point in the history
feat: model generation
  • Loading branch information
lkm authored Apr 29, 2022
2 parents 3eb2fff + 8b8b43a commit fcd6e70
Show file tree
Hide file tree
Showing 49 changed files with 8,110 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.idea/
vendor/
1 change: 1 addition & 0 deletions .phpunit.result.cache
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}}
7 changes: 7 additions & 0 deletions ApiModels/AcademicBook.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php

namespace Bookboon\ApiModels;

class AcademicBook extends Book
{
}
40 changes: 40 additions & 0 deletions ApiModels/Advert.php
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;
}
}
29 changes: 29 additions & 0 deletions ApiModels/Answer.php
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;
}
}
29 changes: 29 additions & 0 deletions ApiModels/AttributeRequest.php
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;
}
}
7 changes: 7 additions & 0 deletions ApiModels/AudioBook.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php

namespace Bookboon\ApiModels;

class AudioBook extends Book
{
}
7 changes: 7 additions & 0 deletions ApiModels/AudioTalkBook.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php

namespace Bookboon\ApiModels;

class AudioTalkBook extends Book
{
}
144 changes: 144 additions & 0 deletions ApiModels/Author.php
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;
}
}
Loading

0 comments on commit fcd6e70

Please sign in to comment.