devvoh / fixedwidth
FixedWidth is a library to read and generate fixed-width data files
Installs: 3 427
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 4
Forks: 3
Open Issues: 3
Requires
- php: >=5.6
This package is auto-updated.
Last update: 2024-12-20 02:34:46 UTC
README
Fixed-width is a simple library that can make working with fixed width file formats much easier. You define a Schema for a line, which can have a delimiter or not, and both the Reader and Generator will work with that Schema.
You can define valid characters, and the line or data will be rejected if it doesn't adhere to it. If a delimiter is found in a data value, it's rejected. If a line is rejected, the Reader
will return null
, which you can then interpret as you wish. If a dataItem is rejected, the Generator
will return -- invalid data: data
.
Requirements
- PHP 5.6, PHP 7
Installation
Fixed-width can be installed by using Composer. Simply run:
composer require devvoh/fixedwidth
License
Fixed-width is open-sourced software licensed under the Unlicense.