Documentation

TabularDataWriter

A class to insert records into a CSV Document.

Table of Contents

Methods

insertAll()  : int
Adds multiple records to the CSV document.
insertOne()  : int
Adds a single record to a CSV document.

Methods

insertAll()

Adds multiple records to the CSV document.

public insertAll(iterable<string|int, array<string|int, null|int|float|string|Stringable>> $records) : int
Parameters
$records : iterable<string|int, array<string|int, null|int|float|string|Stringable>>
Tags
see
TabularDataWriter::insertOne
throws
CannotInsertRecord

If the record can not be inserted

throws
Exception

If the record can not be inserted

Return values
int

insertOne()

Adds a single record to a CSV document.

public insertOne(array<string|int, mixed> $record) : int

A record is an array that can contain scalar type values, NULL values or objects implementing the __toString method.

Parameters
$record : array<string|int, mixed>
Tags
throws
CannotInsertRecord

If the record can not be inserted

throws
Exception

If the record can not be inserted

Return values
int

        
On this page

Search results