beleneglorion / xtoy
A simple mechanism to convert thing X to another thing Y csv->xml rss->database
Installs: 13 412
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 1
Forks: 3
Open Issues: 0
Requires
- php: >=5.3.3
- ext-zip: *
- beleneglorion/spreadsheet-reader: dev-master
- mk-j/php_xlsxwriter: dev-master
- php-excel-reader/spreadsheet-reader: dev-master
- symfony/yaml: >=2.2
Requires (Dev)
- phpunit/phpunit: 4.0.*
This package is not auto-updated.
Last update: 2020-01-20 03:43:21 UTC
README
A configurable engine to convert X to Y :)
Reader
Reader Classes allow to read data from multiple type of source ( csv files, xls(x),database ) Each "line" of the source is returned as an array and passed to mapper for conversion
Mapper
Mapper take a array in input and generate a new one following a set a rules each fields of the new array is calculated using a rule definition
Rules a assossiative array the key is the name of the output field the value is an array definiting what to do.
TODO : Doc of the rules, see samples
Writer
Writer take the array at the ouput of the mapper and save it on on the destination resource, it could be files, databases, what you want just need to code it
Reporter
The whole process can take time, then if you give to each component (reader,mapper, writer) a reporter, they can report the current status of the conversion (total lines, lines read, line write, line mapped)