CorruptedRecordException extends RuntimeException
FinalYes
Tags
Properties
- $fields : array<string|int, mixed>|null
- $lineNumber : int|null
- $offset : int
- $reason : string
- $record : string
- $uri : string|null
Methods
- __construct() : mixed
- fromCells() : self
- A grid record: its cells in their string form, and its text the source's own when it holds one, else the cells as a JSON list.
- fromRecord() : self
- The inverse of toRecord().
- fromValues() : self
- A keyed record: its text the source's own when it holds one, else the record as a JSON object.
- toRecord() : CorruptedRecordShape
- The row a routed corrupted record becomes.
Properties
$fields read-only
public
array<string|int, mixed>|null
$fields
= null
$lineNumber read-only
public
int|null
$lineNumber
$offset read-only
public
int
$offset
$reason read-only
public
string
$reason
$record read-only
public
string
$record
$uri read-only
public
string|null
$uri
Methods
__construct()
public
__construct(null|string $uri, int $offset, int|null $lineNumber, string $reason, string $record[, null|array<int, string> $fields = null ][, Throwable|null $previous = null ]) : mixed
Parameters
- $uri : null|string
-
null for a source that is not a file
- $offset : int
-
the record's byte offset in a text file, its 1-based row number in a sheet or an array
- $lineNumber : int|null
- $reason : string
- $record : string
- $fields : null|array<int, string> = null
-
the cells a grid reader split the record into; null for keyed formats
- $previous : Throwable|null = null
fromCells()
A grid record: its cells in their string form, and its text the source's own when it holds one, else the cells as a JSON list.
public
static fromCells(string|null $uri, int $offset, int|null $lineNumber, string $reason, array<string|int, mixed> $cells[, string|null $record = null ]) : self
Parameters
- $uri : string|null
- $offset : int
- $lineNumber : int|null
- $reason : string
- $cells : array<string|int, mixed>
- $record : string|null = null
Return values
selffromRecord()
The inverse of toRecord().
public
static fromRecord(array<string|int, mixed> $record[, Throwable|null $previous = null ]) : self
Parameters
- $record : array<string|int, mixed>
-
the shape of toRecord()
- $previous : Throwable|null = null
Tags
Return values
selffromValues()
A keyed record: its text the source's own when it holds one, else the record as a JSON object.
public
static fromValues(string|null $uri, int $offset, int|null $lineNumber, string $reason, array<string|int, mixed> $values[, string|null $record = null ]) : self
Parameters
- $uri : string|null
- $offset : int
- $lineNumber : int|null
- $reason : string
- $values : array<string|int, mixed>
- $record : string|null = null
Return values
selftoRecord()
The row a routed corrupted record becomes.
public
toRecord() : CorruptedRecordShape