Introduced new Data Transfer Objects (DTOs), exceptions, and jobs to enhance the translation service functionality. Updated namespaces for consistency and added rate limiting to the translation provider. Expanded the README with detailed usage instructions.
27 lines
527 B
PHP
27 lines
527 B
PHP
<?php declare(strict_types=1);
|
|
|
|
namespace KorElf\TranslateLaravel\DTO;
|
|
|
|
final readonly class ProcessTranslateLimit
|
|
{
|
|
public function __construct(
|
|
private int $maxRequest,
|
|
private int $rateSeconds,
|
|
private string $driver,
|
|
) { }
|
|
|
|
public function getMaxRequest(): int
|
|
{
|
|
return $this->maxRequest;
|
|
}
|
|
|
|
public function getRateSeconds(): int
|
|
{
|
|
return $this->rateSeconds;
|
|
}
|
|
|
|
public function getDriver(): string
|
|
{
|
|
return $this->driver;
|
|
}
|
|
} |