-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
356c691
commit f1066ad
Showing
62 changed files
with
975 additions
and
1,022 deletions.
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
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
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
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
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,12 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace App\Dto\Collection; | ||
|
||
use App\Collection\CollectionInterface; | ||
|
||
interface CollectionRequestInterface | ||
{ | ||
public function createCollection(): CollectionInterface; | ||
} |
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,10 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace App\Dto\Collection; | ||
|
||
final class PetCollectionFilters | ||
{ | ||
public null|string $name; | ||
} |
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,30 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace App\Dto\Collection; | ||
|
||
use App\Collection\CollectionInterface; | ||
use App\Collection\PetCollection; | ||
|
||
final class PetCollectionRequest implements CollectionRequestInterface | ||
{ | ||
public int $offset; | ||
|
||
public int $limit; | ||
|
||
public PetCollectionFilters $filters; | ||
|
||
public PetCollectionSort $sort; | ||
|
||
public function createCollection(): CollectionInterface | ||
{ | ||
$collection = new PetCollection(); | ||
$collection->setOffset($this->offset); | ||
$collection->setLimit($this->limit); | ||
$collection->setFilters((array) $this->filters); | ||
$collection->setSort((array) $this->sort); | ||
|
||
return $collection; | ||
} | ||
} |
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,33 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace App\Dto\Collection; | ||
|
||
final class PetCollectionResponse | ||
{ | ||
public int $offset; | ||
|
||
public int $limit; | ||
|
||
/** | ||
* @var array<string, string> | ||
*/ | ||
public array $filters; | ||
|
||
/** | ||
* @var array<string, string> | ||
*/ | ||
public array $sort; | ||
|
||
public PetCollectionResponseEmbedded $_embedded; | ||
|
||
public int $count; | ||
|
||
public string $_type; | ||
|
||
/** | ||
* @var array<string, LinkResponse> | ||
*/ | ||
public array $_links; | ||
} |
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,13 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace App\Dto\Collection; | ||
|
||
final class PetCollectionResponseEmbedded | ||
{ | ||
/** | ||
* @var array<PetResponse> | ||
*/ | ||
public array $items; | ||
} |
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,10 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace App\Dto\Collection; | ||
|
||
final class PetCollectionSort | ||
{ | ||
public null|string $name = null; | ||
} |
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,22 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace App\Dto; | ||
|
||
final class LinkResponse | ||
{ | ||
public string $href; | ||
|
||
public bool $templated; | ||
|
||
/** | ||
* @var array<string> | ||
*/ | ||
public array $rel; | ||
|
||
/** | ||
* @var array<string, string> | ||
*/ | ||
public array $attributes; | ||
} |
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,14 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace App\Dto\Model; | ||
|
||
use App\Model\ModelInterface; | ||
|
||
interface ModelRequestInterface | ||
{ | ||
public function createModel(): ModelInterface; | ||
|
||
public function updateModel(ModelInterface $model): ModelInterface; | ||
} |
Oops, something went wrong.