Download the PHP package florianeckerstorfer/console-import-standard-edition without Composer
On this page you can find all versions of the php package florianeckerstorfer/console-import-standard-edition. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download florianeckerstorfer/console-import-standard-edition
More information about florianeckerstorfer/console-import-standard-edition
Files in florianeckerstorfer/console-import-standard-edition
Package console-import-standard-edition
Short Description A boilerplate for console-based data import scripts
License MIT
Informations about the package console-import-standard-edition
Console Import Standard Edition
A boilerplate for console-based data import scripts using symfony/console and ddeboer/data-import.
Installation
You need Composer to create a new data import script:
After you have installed Composer you can create a new project using the following command:
The sample classes provided in this project reside in the Acme\DemoImport
namespace. However, since this project uses
PSR-4 I can place the classes directly in the src/
directory. Currently only the
Command
directory contains a file and you should open it and change the namespace according to your needs. You
also have to adapt the namespace in composer.json
in the autoload.psr-4
option.
Usage
After implementing your import logic in a command you can run the application:
This will give you a list of all available commands. The demo command is called import
and you need to call it the
name of a CSV file.
Adding Additional Commands
You can add additional commands to the application by creating a command and adding it to the application. Learn more about creating commands in the Console documentation.
Author
Developed by Florian Eckerstorfer in Vienna, Europe. I am @Florian_ on Twitter. I post updates for my open source projects using the Twitter handle @braincrafted.