Download the PHP package middlewares/csv-payload without Composer
On this page you can find all versions of the php package middlewares/csv-payload. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download middlewares/csv-payload
More information about middlewares/csv-payload
Files in middlewares/csv-payload
Package csv-payload
Short Description Middleware to parse the CSV body of the request
License MIT
Homepage https://github.com/middlewares/csv-payload
Informations about the package csv-payload
middlewares/csv-payload
Extends middlewares/payload to add support for parsing the CSV body of the request.
Requirements
- PHP >= 7.0
- A PSR-7 http message implementation (Diactoros, Guzzle, Slim, etc...)
- A PSR-15 middleware dispatcher
Installation
This package is installable and autoloadable via Composer as middlewares/csv-payload.
CsvPayload
Parses the CSV payload of the request. Uses league/csv to read the CSV values. Contains the following options to configure the CSV Reader
object:
delimiter($delimiter)
To configure the CSV delimiter control character (one character only). If the submitted character is invalid an InvalidArgumentException
exception is thrown.
enclosure($enclosure)
To configure the CSV enclosure control character (one character only). If the submitted character is invalid an InvalidArgumentException
exception is thrown.
escape($escape)
To configure the CSV escape control character (one character only). If the submitted character is invalid an InvalidArgumentException
exception is thrown.
header($header)
To configure the CSV header line. If the submitted header value is less than 0 an InvalidArgumentException
exception is thrown.
methods(array $methods)
To configure the allowed methods. By default only the requests with the method POST, PUT, PATCH, DELETE, COPY, LOCK, UNLOCK
are handled.
contentType(array $contentType)
To configure all Content-Type headers used in the request. By default is text/csv
override($override = true)
To override the previous parsed body if exists (false
by default)
Please see CONTRIBUTING for contributing details.
The MIT License (MIT). Please see LICENSE for more information.
All versions of csv-payload with dependencies
league/csv Version ^9.0
middlewares/payload Version ^3
middlewares/utils Version ^2 || ^3 || ^4
psr/http-server-middleware Version ^1