<?php
namespace App\Service\Top100;
use App\Dto\Top100\Top100ProfileQueryByIdsDTO;
use App\Dto\Top100\Top100ProfileQueryRandomDTO;
use App\Service\ProfileList;
use App\Specification\Profile\ProfileIdINOrderedByINValues;
final class Top100ProfileQueryService
{
public function __construct(private ProfileList $profileList) {}
public function getActiveProfilesByIds(Top100ProfileQueryByIdsDTO $dto): array
{
return $this->profileList->listActiveWithinCityOrderedByStatusWithSpecLimited(
$dto->city,
new ProfileIdINOrderedByINValues($dto->ids),
$dto->filters,
$dto->genders,
false,
$dto->limit,
);
}
public function createFakePageFromProfiles(int $total, array $profiles): \Porpaginas\Page
{
return $this->profileList->createFakePageFromProfiles($total, $profiles);
}
public function getRandomProfiles(Top100ProfileQueryRandomDTO $dto): array
{
return $this->profileList->listRandom(
$dto->city,
$dto->district,
$dto->station,
$dto->filters,
false,
$dto->excludeHidden,
$dto->genders,
$dto->withPhoto,
$dto->limit,
);
}
}