<commit_before># FINDOLOGIC export toolkit

[![Travis](https://img.shields.io/travis/findologic/libflexport.svg)](https://travis-ci.org/findologic/libflexport)
[![Latest Stable Version](https://poser.pugx.org/findologic/libflexport/v/stable)](https://packagist.org/packages/findologic/libflexport)
[![Code Coverage](https://codeclimate.com/github/findologic/libflexport.svg)](https://codeclimate.com/github/findologic/libflexport)

**Highly experimental! Don't use it!**<commit_msg>Update README.md file (#9)<commit_after># FINDOLOGIC export toolkit

[![Travis](https://img.shields.io/travis/findologic/libflexport.svg)](https://travis-ci.org/findologic/libflexport)
[![Latest Stable Version](https://poser.pugx.org/findologic/libflexport/v/stable)](https://packagist.org/packages/findologic/libflexport)
[![Code Coverage](https://codeclimate.com/github/findologic/libflexport.svg)](https://codeclimate.com/github/findologic/libflexport)

## Synopsis

This project provides a export library for XML and CSV generation according to the FINDOLOGIC export patterns.
* XML <https://docs.findologic.com/doku.php?id=export_patterns:xml>
* CSV <https://docs.findologic.com/doku.php?id=export_patterns:csv>

####Export recommendation

Using the XML export is recommended by FINDOLOGIC. The XML is easier to read and has some advantages over the CSV export like:

* No encoding issues as the encoding attribute is provided in the XML response `<?xml version="1.0" encoding="UTF-8"?>`
* Validation is more reliable
* Simple escaping of content using the `<![CDATA[...]]>`-tag
* Standardized structure
* Dynamically extract the products from the database via `start` and `count` parameter in the url
* No limited file size for XML because of pagination
* Using multiple usergroups per product

## Basic usage

### XML export

```php
require_once './vendor/autoload.php';

use \FINDOLOGIC\Export\XML\XMLExporter;
use \FINDOLOGIC\Export\Data\Price;

$exporter = Exporter::create(Exporter::TYPE_XML);

$item = $exporter->createItem('123');

$price = new Price();
$price->setValue('13.37');
$item->setPrice($price);

$exporter->serializeItems(array($item), 0, 1);
```

## Setup

1. Include as composer dependency using `composer require findologic/libflexport`
2. Load `./vendor/autoload.php` into the project

## Contributors

If you want to contribute to this project, feel free to fork the repository. Afterwards you can create a pull request following the steps mentioned at [this Github help page.](https://help.github.com/articles/creating-a-pull-request-from-a-fork/)

Tests should be provided if possible.

Running `php-cs-fixer` before commiting will reduce style-caused build failures.
{'fraction_non_alphanumeric': 0.13507462686567165, 'fraction_numerical': 0.005597014925373134, 'mean_word_length': 5.6361386138613865, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 1, '>': 11, 'https://': 15, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1579422', 'n_tokens_mistral': 870, 'n_tokens_neox': 823, 'n_words': 217}