translate-laravel/src/DTO/AfterTranslateDto.php

32 lines
869 B
PHP

<?php declare(strict_types=1);
namespace KorElf\TranslateLaravel\DTO;
final readonly class AfterTranslateDto
{
/**
* @param string $className The fully qualified class name (FQN) of a class that implements the TranslationCompletedListener interface.
* @param array $data Additional data associated with the translation process.
*/
public function __construct(
private string $className,
private array $data = [],
) { }
/**
* Get the fully qualified class name (FQN) of a class that implements the TranslationCompletedListener interface.
*
* @return class-string<\KorElf\TranslateLaravel\Contracts\TranslationCompletedListener>
*/
public function getClassName(): string
{
return $this->className;
}
public function getData(): array
{
return $this->data;
}
}