2017 © Pedro Peláez
 

symfony-bundle edi-parser

A simple positional EDI parser for Symfony

image

boda/edi-parser

A simple positional EDI parser for Symfony

  • Thursday, April 26, 2018
  • by davidbonachera
  • Repository
  • 1 Watchers
  • 1 Stars
  • 123 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 13 Versions
  • 5 % Grown

The README.md

Edi Parser Bundle

Codacy Badge Code Climate, (*1)

A simple positional edi parser to transform a string to a key-value array based on a template, (*2)

Installation

Installation using composer is really easy: this command will add "boda/edi-parser" to your composer.json and will download the bundle:, (*3)

composer require boda/edi-parser

Enable the bundle in your kernel:, (*4)

<?php
// app/AppKernel.php
public function registerBundles()
{
    $bundles = array(
        // ...
        new Boda\EdiParserBundle\BodaEdiParserBundle(),
    );
}

How to use

Use it inside a controller, (*5)

@Todo : Rewrite example

Result

array:3 [▼
  "header" => array:5 [▼ // Header
    "IDENTIFIER" => "00"
    "DOT" => "."
    "NUMBER" => "00"
    "TEST" => " "
    "HEADER" => "HEADER"
  ]
  "body" => array:2 [▼ // Body
    1 => array:2 [▼ // Group 1
      0 => array:5 [▼ // Group 1 header
        "IDENTIFIER" => "41"
        "DOT" => "."
        "NUMBER" => "00"
        "TEST" => " "
        "CONTENT" => "CONTENT1"
      ]
      1 => array:7 [▼ // Group 1 line
        "IDENTIFIER" => "41"
        "DOT" => "."
        "NUMBER" => "20"
        "TEST" => " "
        "CONTENT" => "CONTENT2"
        "SPACE" => " "
        "SUBLINE" => "subline"
      ]
    ]
    2 => array:1 [▼ // Group 2
      0 => array:5 [...] // Group 2 header
    ]
  ]
  "footer" => array:5 [▼ // Footer
    "IDENTIFIER" => "99"
    "DOT" => "."
    "NUMBER" => "00"
    "TEST" => " "
    "CONTENT" => "FOOTER"
  ]
]

To-Do

Well, a lot of stuff to improve I guess, let's do a list, (*6)

  • [ ] Customize with configuration (with or without header/footer, nested level)
  • [ ] Do some proper error handling for missing arguments
  • [ ] Define different model for differents EDI.

The Versions

26/04 2018

dev-develop

dev-develop

A simple positional EDI parser for Symfony

  Sources   Download

Apache-2.0

The Requires

 

symfony3 edi

07/11 2017

dev-master

9999999-dev

A simple positional EDI parser for Symfony

  Sources   Download

Apache-2.0

The Requires

 

symfony3 edi

07/11 2017

v0.1.1

0.1.1.0

A simple positional EDI parser for Symfony

  Sources   Download

Apache-2.0

The Requires

 

symfony3 edi

23/10 2017

v0.1.0

0.1.0.0

A simple positional EDI parser for Symfony

  Sources   Download

Apache-2.0

The Requires

 

symfony3 edi

20/09 2017

v0.0.9

0.0.9.0

A simple positional EDI parser for Symfony

  Sources   Download

Apache-2.0

The Requires

 

symfony3 edi

10/08 2017

v0.0.8

0.0.8.0

A simple positional EDI parser for Symfony

  Sources   Download

Apache-2.0

The Requires

 

symfony3 edi

09/08 2017

v0.0.7

0.0.7.0

A simple positional EDI parser for Symfony

  Sources   Download

Apache-2.0

The Requires

 

symfony3 edi

04/07 2017

v0.0.6

0.0.6.0

A simple positional EDI parser for Symfony

  Sources   Download

Apache-2.0

The Requires

 

symfony3 edi

06/06 2017

v0.0.5

0.0.5.0

A simple positional EDI parser for Symfony

  Sources   Download

Apache-2.0

symfony3 edi

27/04 2017

v0.0.4

0.0.4.0

A simple positional EDI parser for Symfony

  Sources   Download

Apache-2.0

symfony3 edi

26/04 2017

v0.0.3

0.0.3.0

A simple positional EDI parser for Symfony

  Sources   Download

Apache-2.0

symfony3 edi

20/03 2017

v0.0.1-beta

0.0.1.0-beta

A simple positional EDI parser

  Sources   Download

Apache-2.0

symfony3 edi

20/03 2017

v0.0.1

0.0.1.0

A simple positional EDI parser

  Sources   Download

Apache-2.0

symfony3 edi