modifs.mineures sans commentaires
This commit is contained in:
parent
7a8a699294
commit
a7ac59ec9c
|
@ -14,7 +14,7 @@ trait TAbstractBuilder {
|
||||||
# faire un builder dans le même format que le fichier uploadé
|
# faire un builder dans le même format que le fichier uploadé
|
||||||
if ($builder->isExt(".csv")) $class = CsvBuilder::class;
|
if ($builder->isExt(".csv")) $class = CsvBuilder::class;
|
||||||
else $class = static::class;
|
else $class = static::class;
|
||||||
return $class($builder->name);
|
return new $class($builder->name);
|
||||||
}
|
}
|
||||||
if (is_string($builder)) $builder = ["output" => $builder];
|
if (is_string($builder)) $builder = ["output" => $builder];
|
||||||
if (!is_array($builder)) {
|
if (!is_array($builder)) {
|
||||||
|
@ -25,6 +25,6 @@ trait TAbstractBuilder {
|
||||||
$class = CsvBuilder::class;
|
$class = CsvBuilder::class;
|
||||||
}
|
}
|
||||||
if ($class === null) $class = static::class;
|
if ($class === null) $class = static::class;
|
||||||
return $class($builder);
|
return new $class(null, $builder);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,7 @@ trait TAbstractReader {
|
||||||
if ($reader instanceof Upload) {
|
if ($reader instanceof Upload) {
|
||||||
if ($reader->isExt(".csv")) $class = CsvReader::class;
|
if ($reader->isExt(".csv")) $class = CsvReader::class;
|
||||||
else $class = static::class;
|
else $class = static::class;
|
||||||
return $class($reader->tmpName);
|
return new $class($reader->tmpName);
|
||||||
}
|
}
|
||||||
if (is_string($reader)) $reader = ["input" => $reader];
|
if (is_string($reader)) $reader = ["input" => $reader];
|
||||||
if (!is_array($reader)) {
|
if (!is_array($reader)) {
|
||||||
|
@ -24,6 +24,6 @@ trait TAbstractReader {
|
||||||
$class = CsvReader::class;
|
$class = CsvReader::class;
|
||||||
}
|
}
|
||||||
if ($class === null) $class = static::class;
|
if ($class === null) $class = static::class;
|
||||||
return $class($reader);
|
return new $class(null, $reader);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue