Skip to content

Experimental FINDOLOGIC export toolkit for XML and CSV data export

License

Notifications You must be signed in to change notification settings

MohamadAssani/libflexport

 
 

Repository files navigation

FINDOLOGIC export toolkit

Travis Latest Stable Version Code Coverage

Synopsis

This project provides a export library for XML and CSV generation according to the FINDOLOGIC export patterns.

####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

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.

Tests should be provided if possible.

Running php-cs-fixer before commiting will reduce style-caused build failures.

About

Experimental FINDOLOGIC export toolkit for XML and CSV data export

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%