bitzyk/test-parser

Parser that read csv file and save xml or html output according to specifications

dev-master 2015-04-19 16:13 UTC

This package is not auto-updated.

Last update: 2024-05-01 05:59:43 UTC


README

File adaptor that read from a given CSV file and writes data into an output file according to different writter specifications.

Requirements

(>=) PHP 5.3

  • Make use of SPL (Standard PHP Library) -> in the php core from 5.3
  • Type hinting array from 5.1
  • XmlWritter from 5.1.2
  • php libxml should not be disabled

Installation

GitHub
Composer

Add packet in composer.json file:

{
  "require" : {
		"bitzyk/test-parser": "dev-master"
	}
}

and then:

php composer install

or

php composer update
ZIP
  • download zip archieve and unzip on you pc

Run

CLI
php {installationDir}/testParser/FileAdaptor/fileAdaptorBootstrap.php {outputFormat}
HTTP
access {serverName}/testParser/FileAdaptor/fileAdaptorBootstrap.php 

Options

Output Format
  • xml or html

Personal Note:

  • My main focus on this test was for the script to be able to process very large files. So, to achieve this, I developed an architecture which favored memory usage at the expense of cpu usage.
  • In the same time i wanted to keep the code in a very easy to read form and to scale for future modification.