2017 © Pedro Peláez
 

library zfc-importer

ZF2 module for PHP Importer library

image

agerecompany/zfc-importer

ZF2 module for PHP Importer library

  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 33 % Grown

The README.md

ZF2 Importer module

ZF2 module for PHP Importer library, (*1)

Installation

Install it with composer, (*2)

composer require popov/zfc-importer -o

NOTE: with 1.x we dropped support for other installation technics. Especially the ZF2 autoloading was dropped. You just need to switch to composer installation, which will make your life easier, since it comes with all needed features, (*3)

Add Popov\ZfcImporter to your config/modules.config.php, (*4)

Usage

Basic usage

See file example here., (*5)

Create new module and add import configuration, (*6)

// module/Popov/Discount/config/module.config.php
namespace Popov\Discount;

return [
  'importer' => require_once(__DIR__ . '/importer.config.php'),
]
// module/Popov/Discount/config/importer.config.php
namespace Popov\Discount;

return [
    'tasks' => [
        __NAMESPACE__ . '\\Card' => [ // on the inner level will be converted to "popov-discount-card"
            'driver' => 'libxl',
            'fields_map' => [
                [
                    'Nominal' => ['name' => 'discount', '__filter' => ['percentToInt']],
                    'Serial' => 'serial',
                    '__table' => 'discount_card',
                    '__codename' => 'discount',
                    '__identifier' => 'code',
                    '__exclude' => false,
                ],
            ],
        ],
    ],
];

Now you can go to http://example.com/importer/import/type/popov-discount-card and select file for import. As you can see /type/popov-discount-card in url will be converted to Popov\Discount\Card that correspond __NAMESPACE__ . '\\Card' key in configuration., (*7)

The Versions

10/04 2017

dev-master

9999999-dev

ZF2 module for PHP Importer library

  Sources   Download

MIT

The Requires

 

csv excel agere importer

30/08 2016

0.1.2

0.1.2.0

ZF2 module for PHP Importer library

  Sources   Download

MIT

The Requires

 

csv excel agere importer

27/06 2016

0.1.1

0.1.1.0

ZF2 module for PHP Importer library

  Sources   Download

MIT

The Requires

 

csv excel agere importer