Download the PHP package mehr-it/data-interchange-format without Composer
On this page you can find all versions of the php package mehr-it/data-interchange-format. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download mehr-it/data-interchange-format
More information about mehr-it/data-interchange-format
Files in mehr-it/data-interchange-format
Download mehr-it/data-interchange-format
More information about mehr-it/data-interchange-format
Files in mehr-it/data-interchange-format
Vendor mehr-it
Package data-interchange-format
Short Description Data interchange format (DIF) writer
License MIT
Package data-interchange-format
Short Description Data interchange format (DIF) writer
License MIT
Please rate this library. Is it a good library?
Informations about the package data-interchange-format
PHP Data interchange format writer (DIF)
This package implements a simple data interchange format (DIF) writer.
Usage
To create a DIF file, columns with data types have to be specified and the data has to be passed as array to the writer:
(new DifWriter())
->columns([
'Text' => DifWriter::TYPE_STRING,
'Number' => DifWriter::TYPE_NUMERIC,
])
->data([
[
'Text' => 'hello',
'Number' => 1,
],
[
'Text' => 'this is me',
'Number' => -3.5,
],
])
->writeTo($target)
Input/output encoding may be specified as well as the linebreak to use using the corresponding setter functions of the writer class.
By default the column headers are output as first line. To disable column header output, simply
pass false
as second argument to the columns()
method:
$writer->columns([
'Text' => DifWriter::TYPE_STRING,
'Number' => DifWriter::TYPE_NUMERIC,
], false);
All versions of data-interchange-format with dependencies
PHP Build Version
Package Version
Requires
php Version
>=7.2.0
ext-mbstring Version *
thecodingmachine/safe Version ^0.1.16
mehr-it/php-decimals Version ^2.1
ext-mbstring Version *
thecodingmachine/safe Version ^0.1.16
mehr-it/php-decimals Version ^2.1
The package mehr-it/data-interchange-format contains the following files
Loading the files please wait ....