modifs.mineures sans commentaires
This commit is contained in:
parent
a76f820fa6
commit
3bb18450fd
|
@ -11,7 +11,7 @@ abstract class AbstractReader implements IReader {
|
|||
const HEADERS = null;
|
||||
|
||||
/** @var bool faut-il utiliser les en-têtes pour retourner des tableaux associatifs? */
|
||||
const COOk_ROWS = true;
|
||||
const USE_HEADERS = true;
|
||||
|
||||
/** @var ?string nom du fichier depuis lequel lire */
|
||||
const INPUT = null;
|
||||
|
@ -40,7 +40,7 @@ abstract class AbstractReader implements IReader {
|
|||
#
|
||||
$this->schema = $params["schema"] ?? static::SCHEMA;
|
||||
$this->headers = $params["headers"] ?? static::HEADERS;
|
||||
$this->cookRows = $params["cook_rows"] ?? static::COOk_ROWS;
|
||||
$this->useHeaders = $params["use_headers"] ?? static::USE_HEADERS;
|
||||
$this->input = $params["input"] ?? static::INPUT;
|
||||
$this->trim = boolval($params["trim"] ?? static::TRIM);
|
||||
$this->parseEmptyAsNull = boolval($params["empty_as_null"] ?? static::PARSE_EMPTY_AS_NULL);
|
||||
|
@ -52,7 +52,7 @@ abstract class AbstractReader implements IReader {
|
|||
|
||||
protected ?array $headers;
|
||||
|
||||
protected bool $cookRows;
|
||||
protected bool $useHeaders;
|
||||
|
||||
protected $input;
|
||||
|
||||
|
@ -67,7 +67,7 @@ abstract class AbstractReader implements IReader {
|
|||
protected int $isrc = 0, $idest = 0;
|
||||
|
||||
protected function cookRow(array &$row): bool {
|
||||
if (!$this->cookRows) return true;
|
||||
if (!$this->useHeaders) return true;
|
||||
if ($this->isrc == 0) {
|
||||
# ligne d'en-tête
|
||||
$headers = $this->headers;
|
||||
|
|
Loading…
Reference in New Issue