39 lines
877 B
PHP
39 lines
877 B
PHP
<?php
|
|
|
|
namespace App\Service\Import\Result;
|
|
|
|
class ImportResult
|
|
{
|
|
private array $errors;
|
|
private bool $success;
|
|
private string $message;
|
|
private int $processedCount;
|
|
|
|
public function __construct(array $errors, bool $success, string $message, int $processedCount)
|
|
{
|
|
$this->errors = $errors;
|
|
$this->success = $success;
|
|
$this->message = $message;
|
|
$this->processedCount = $processedCount;
|
|
}
|
|
public function getErrors(): array
|
|
{
|
|
return $this->errors;
|
|
}
|
|
public function isSuccess(): bool
|
|
{
|
|
return $this->success;
|
|
}
|
|
public function getMessage(): string
|
|
{
|
|
return $this->message;
|
|
}
|
|
public function getProcessedCount(): int
|
|
{
|
|
return $this->processedCount;
|
|
}
|
|
public function hasErrors(): bool
|
|
{
|
|
return !empty($this->errors);
|
|
}
|
|
} |