Flow PHP

CorruptedRecordException extends RuntimeException

FinalYes
Tags
type

CorruptedRecordShape = array{ uri: ?string, offset: int, line: ?int, reason: string, record: string, fields: null|list }

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

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
self

fromRecord()

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
throws
InvalidArgumentException
Return values
self

fromValues()

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
self

toRecord()

The row a routed corrupted record becomes.

public toRecord() : CorruptedRecordShape
Return values
CorruptedRecordShape
On this page

Search results