blob: 278bb2c0054d5f0d7ac48b0e290c92622dd1b841 [file] [log] [blame]
<?php
namespace App\Service;
use App\Entity\LeafOta;
use App\Repository\LeafOtaRepository;
use DateTime;
class LeafOtaService {
public function __construct(
private LeafOtaRepository $repository
) {}
public function getLatestBuildForDevice(string $device, string $flavor = ''): ?LeafOta {
return $this->repository->getLatestBuildForDevice($device, $flavor);
}
public function getLatestOTAForDevice(string $device, string $flavor = ''): ?LeafOta {
return $this->repository->getLatestOTAForDevice($device, $flavor);
}
public function getAllBuildsForDevice(string $device, string $flavor = ''): array {
return $this->repository->getAllBuildsForDevice($device, $flavor);
}
public function getAllOTAsForDevice(string $device, string $flavor = ''): array {
return $this->repository->getAllOTAsForDevice($device, $flavor);
}
}