boda/edi-parser 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

boda/edi-parser

最新稳定版本:v0.1.4

Composer 安装命令:

composer require boda/edi-parser

包简介

A simple positional EDI parser for Symfony

README 文档

README

Codacy Badge Code Climate

A simple positional edi parser to transform a string to a key-value array based on a template

Installation

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

composer require boda/edi-parser

Enable the bundle in your kernel:

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

How to use

Use it inside a controller

@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

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

统计信息

  • 总下载量: 434
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 2
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2017-03-20

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固