文字コード判定と必須列のチェックまで

This commit is contained in:
shibafu committed 2020-02-04 01:44:16 +09:00
1 parent b2eed9a9c5
commit 38ae540009
6 files changed
+146

No files matched your search

+29
View File
@@ -0,0 +1,29 @@
<?php
namespace App\Exceptions;
use Throwable;
class CsvImportException extends \RuntimeException
{
/** @var string[] */
private $errors;
/**
* CsvImportException constructor.
* @param string[] $errors
*/
public function __construct(array $errors)
{
parent::__construct(array_first($errors));
$this->errors = $errors;
}
/**
* @return string[]
*/
public function getErrors(): array
{
return $this->errors;
}
}