trait CanImportRecords (View source)

Properties

protected Importer> $importer
protected string|null $job
protected int|Closure $chunkSize
protected int|Closure|null $maxRows
protected int|Closure|null $headerOffset
protected string|Closure|null $csvDelimiter
protected array<string,mixed> $options
protected array $fileValidationRules

Methods

void
setUp()

No description

resource
getUploadedFileStream(TemporaryUploadedFile $file)

No description

string|null
detectCsvEncoding(mixed $resource)

No description

static string|null
getDefaultName()

No description

importer(string $importer)

No description

job(string|null $job)

No description

chunkSize(int|Closure $size)

No description

maxRows(int|Closure|null $rows)

No description

headerOffset(int|Closure|null $offset)

No description

csvDelimiter(string|Closure|null $delimiter)

No description

string
getImporter()

No description

string
getJob()

No description

int
getChunkSize()

No description

int|null
getMaxRows()

No description

int|null
getHeaderOffset()

No description

string|null
getCsvDelimiter(Reader|null $reader = null)

No description

string|null
guessCsvDelimiter(Reader|null $reader = null)

No description

options(array|Closure $options)

No description

array
getOptions()

No description

fileRules(string|array|Closure $rules)

No description

array
getFileValidationRules()

No description

Details

protected void setUp()

No description

Return Value

void

resource getUploadedFileStream(TemporaryUploadedFile $file)

No description

Parameters

TemporaryUploadedFile $file

Return Value

resource

| false

protected string|null detectCsvEncoding(mixed $resource)

No description

Parameters

mixed $resource

Return Value

string|null

static string|null getDefaultName()

No description

Return Value

string|null

CanImportRecords importer(string $importer)

No description

Parameters

string $importer

Return Value

CanImportRecords

CanImportRecords job(string|null $job)

No description

Parameters

string|null $job

Return Value

CanImportRecords

CanImportRecords chunkSize(int|Closure $size)

No description

Parameters

int|Closure $size

Return Value

CanImportRecords

CanImportRecords maxRows(int|Closure|null $rows)

No description

Parameters

int|Closure|null $rows

Return Value

CanImportRecords

CanImportRecords headerOffset(int|Closure|null $offset)

No description

Parameters

int|Closure|null $offset

Return Value

CanImportRecords

CanImportRecords csvDelimiter(string|Closure|null $delimiter)

No description

Parameters

string|Closure|null $delimiter

Return Value

CanImportRecords

string getImporter()

No description

Return Value

string

string getJob()

No description

Return Value

string

int getChunkSize()

No description

Return Value

int

int|null getMaxRows()

No description

Return Value

int|null

int|null getHeaderOffset()

No description

Return Value

int|null

string|null getCsvDelimiter(Reader|null $reader = null)

No description

Parameters

Reader|null $reader

Return Value

string|null

protected string|null guessCsvDelimiter(Reader|null $reader = null)

No description

Parameters

Reader|null $reader

Return Value

string|null

CanImportRecords options(array|Closure $options)

No description

Parameters

array|Closure $options

Return Value

CanImportRecords

array getOptions()

No description

Return Value

array

CanImportRecords fileRules(string|array|Closure $rules)

No description

Parameters

string|array|Closure $rules

Return Value

CanImportRecords

array getFileValidationRules()

No description

Return Value

array