This commit is contained in:
Xes
2025-08-14 22:41:49 +02:00
parent 2de81ccc46
commit 8ce45119b6
39774 changed files with 4309466 additions and 0 deletions
@@ -0,0 +1,17 @@
<?php
namespace Ddeboer\DataImport\Exception;
/**
* @author David de Boer <david@ddeboer.nl>
*/
class DuplicateHeadersException extends ReaderException
{
/**
* @param array $duplicates
*/
public function __construct(array $duplicates)
{
parent::__construct(sprintf('File contains duplicate headers: %s', implode($duplicates, ', ')));
}
}
@@ -0,0 +1,15 @@
<?php
namespace Ddeboer\DataImport\Exception;
use Ddeboer\DataImport\Exception;
/**
* Description of MappingException
*
* @author gnat
*/
class MappingException extends \Exception implements Exception
{
}
@@ -0,0 +1,11 @@
<?php
namespace Ddeboer\DataImport\Exception;
/**
* @author David de Boer <david@ddeboer.nl>
*/
class ReaderException extends UnexpectedValueException
{
}
@@ -0,0 +1,13 @@
<?php
namespace Ddeboer\DataImport\Exception;
use Ddeboer\DataImport\Exception;
/**
* @author Markus Bachmann <markus.bachmann@bachi.biz>
*/
class SourceNotFoundException extends \Exception implements Exception
{
}
@@ -0,0 +1,22 @@
<?php
namespace Ddeboer\DataImport\Exception;
/**
* @author David de Boer <david@ddeboer.nl>
*/
class UnexpectedTypeException extends UnexpectedValueException
{
/**
* @param mixed $value
* @param string $expectedType
*/
public function __construct($value, $expectedType)
{
parent::__construct(sprintf(
'Expected argument of type "%s", "%s" given',
$expectedType,
is_object($value) ? get_class($value) : gettype($value)
));
}
}
@@ -0,0 +1,14 @@
<?php
namespace Ddeboer\DataImport\Exception;
use Ddeboer\DataImport\Exception;
/**
* @author David de Boer <david@ddeboer.nl>
*/
class UnexpectedValueException extends \UnexpectedValueException implements Exception
{
}
@@ -0,0 +1,48 @@
<?php
namespace Ddeboer\DataImport\Exception;
use Ddeboer\DataImport\Exception;
use Symfony\Component\Validator\ConstraintViolationListInterface;
/**
* @author Markus Bachmann <markus.bachmann@bachi.biz>
*/
class ValidationException extends \Exception implements Exception
{
/**
* @var ConstraintViolationListInterface
*/
private $violations;
/**
* @var integer
*/
private $lineNumber;
/**
* @param ConstraintViolationListInterface $list
* @param integer $line
*/
public function __construct(ConstraintViolationListInterface $list, $line)
{
$this->violations = $list;
$this->lineNumber = $line;
}
/**
* @return ConstraintViolationListInterface
*/
public function getViolations()
{
return $this->violations;
}
/**
* @return integer
*/
public function getLineNumber()
{
return $this->lineNumber;
}
}
@@ -0,0 +1,13 @@
<?php
namespace Ddeboer\DataImport\Exception;
use Ddeboer\DataImport\Exception;
/**
* @author David de Boer <david@ddeboer.nl>
*/
class WriterException extends \Exception implements Exception
{
}