jikan-rest/app/Features/AnimeSearchHandler.php
pushrbx a145f18bbd wip - major refactor
- AppServiceProvider is needs more work to wire in new services
- todo: more dtos
- todo: add unit tests
- todo: add more integration tests
2023-05-21 11:14:34 +01:00

27 lines
583 B
PHP

<?php
namespace App\Features;
use App\Dto\AnimeSearchCommand;
use App\Http\Resources\V4\AnimeCollection;
use Illuminate\Contracts\Pagination\LengthAwarePaginator;
/**
* @extends SearchRequestHandler<AnimeSearchCommand, AnimeCollection>
*/
class AnimeSearchHandler extends SearchRequestHandler
{
/**
* @inheritDoc
*/
public function requestClass(): string
{
return AnimeSearchCommand::class;
}
protected function renderResponse(LengthAwarePaginator $paginator): AnimeCollection
{
return new AnimeCollection($paginator);
}
}