Documentation

Import_CSVReader_Reader extends Import_FileReader_Reader
in package

Table of Contents

$errorMessage  : mixed
$moduleModel  : mixed
$numberOfRecordsRead  : mixed
$request  : mixed
$temp_status  : mixed
$user  : mixed
$data  : array<string|int, mixed>
Parsed file data.
__construct()  : mixed
Import_CSVReader_Reader constructor.
addInventoryToDB()  : mixed
Function adds imported inventory data to database.
addRecordToDB()  : int
Function adds imported data to database.
arrayCombine()  : array<string|int, mixed>
Creates a table using one table's values as keys, and the other's as values.
convertCharacterEncoding()  : mixed
createTable()  : mixed
Function creates tables for import in database.
deleteFile()  : mixed
getErrorMessage()  : mixed
getFileHandler()  : mixed
getFilePath()  : mixed
getFirstRowData()  : array<string|int, mixed>
Function gets data of the first record to import.
getNumberOfRecordsRead()  : mixed
getStatus()  : mixed
hasHeader()  : mixed
read()  : mixed
Function creates tables for import in database.
syncRowData()  : array<string|int, mixed>
Adjust first row data to get in sync with the number of headers.

Properties

$numberOfRecordsRead

public mixed $numberOfRecordsRead = 0

$temp_status

public mixed $temp_status = 'success'

$data

Parsed file data.

private array<string|int, mixed> $data

Methods

__construct()

Import_CSVReader_Reader constructor.

public __construct(Request $request, User $user) : mixed
Parameters
$request : Request
$user : User
Return values
mixed

addInventoryToDB()

Function adds imported inventory data to database.

public addInventoryToDB(array<string|int, mixed> $inventoryData, int $importId) : mixed
Parameters
$inventoryData : array<string|int, mixed>
$importId : int
Return values
mixed

addRecordToDB()

Function adds imported data to database.

public addRecordToDB(array<string|int, mixed> $data) : int
Parameters
$data : array<string|int, mixed>
Return values
int

arrayCombine()

Creates a table using one table's values as keys, and the other's as values.

public arrayCombine(array<string|int, mixed> $keys, array<string|int, mixed> $values) : array<string|int, mixed>
Parameters
$keys : array<string|int, mixed>
$values : array<string|int, mixed>
Return values
array<string|int, mixed>

convertCharacterEncoding()

public convertCharacterEncoding(mixed $value, mixed $fromCharset, mixed $toCharset) : mixed
Parameters
$value : mixed
$fromCharset : mixed
$toCharset : mixed
Tags
deprecated

Use \App\Utils::convertCharacterEncoding()

Return values
mixed

createTable()

Function creates tables for import in database.

public createTable() : mixed
Return values
mixed

deleteFile()

public deleteFile() : mixed
Return values
mixed

getErrorMessage()

public getErrorMessage() : mixed
Return values
mixed

getFileHandler()

public getFileHandler() : mixed
Return values
mixed

getFilePath()

public getFilePath() : mixed
Return values
mixed

getFirstRowData()

Function gets data of the first record to import.

public getFirstRowData([bool $hasHeader = true ]) : array<string|int, mixed>
Parameters
$hasHeader : bool = true
Return values
array<string|int, mixed>

getNumberOfRecordsRead()

public getNumberOfRecordsRead() : mixed
Return values
mixed

getStatus()

public getStatus() : mixed
Return values
mixed

hasHeader()

public hasHeader() : mixed
Return values
mixed

read()

Function creates tables for import in database.

public read() : mixed
Return values
mixed

syncRowData()

Adjust first row data to get in sync with the number of headers.

public syncRowData(array<string|int, mixed> $keys, array<string|int, mixed> $values) : array<string|int, mixed>
Parameters
$keys : array<string|int, mixed>
$values : array<string|int, mixed>
Return values
array<string|int, mixed>

        

Search results