pvessel / table-converter-bundle
This bundle provides flexible tool to convert table data between different formats.
Installs: 13
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=5.3.2
- symfony/framework-bundle: ~2.3
Requires (Dev)
- phpunit/phpunit: ~3.7
- symfony/console: ~2.3
- symfony/yaml: ~2.3
This package is not auto-updated.
Last update: 2025-05-10 18:37:06 UTC
README
This simple bundle provides flexible tool to convert table data between different formats. For example:
Array coded in json may be converted to csv string, or HTML table can be converted to XML string.
It uses built-in and external "importers" (to parse source string) and "exporters" (to generate target string).
Installation
Step 1: Download PvesselTableConverterBundle using composer
Tell composer to require PvesselTableConverterBundle by running the command:
$ php composer.phar require "pvessel/table-converter-bundle:dev-master"
Composer will install the bundle to your project's vendor/pvessel/table-converter-bundle
directory.
Step 2: Enable the bundle
Finally, enable the bundle in the kernel:
<?php // app/AppKernel.php public function registerBundles() { $bundles = array( // ... new Pvessel\TableConverterBundle\PvesselTableConverterBundle(), ); }
Configuration
This bundle works as service. It means that all you need to get it is:
$convertedTable = $this->container->get('pvessel_table_converter.manager') ->setSource($sourceTable) ->convert($importerAlias, $exporterAlias) ->getTarget();
Importers and exporters
In order to run, bundle uses importers and exporters. There are few built-in:
- json
- xml
- html_table
- html_ul
- ascii_table
- csv
See Documentation for more informations.