rogerza/php-simple-text-parser 问题修复 & 功能扩展

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

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

rogerza/php-simple-text-parser

Composer 安装命令:

composer require rogerza/php-simple-text-parser

包简介

A simple library intended to break texts into structured data based on configuration files.

README 文档

README

About

This is a simple, extensible, lightweight library with zero dependencies, made with the aim to make process of converting text files into structured data a little more easy.

Perfect to work with EDI Formats like Febraban CNAB240, Febraban CNAB400, Serasa Pefin etc..

Atenttion: This library isn't ready for production yet and can have breaking changes in the next versions

How to use

To use this library you must create a Layout file defining how you want to parse a string.

You can also specify a class to use as "Encoder" and "Decoder", for example, you can definy an Encoder that gets a DateTime and encode it to to "2019-01-06" when Writing, and decode to a DateTime again when Reading.

See folder docs/samples/ to know the available configs.

After the Layouts are created, you can also create a Template to combine multiple layouts and parse a String that has multiples pattern. See sample 4 - Templates.

Todo

  • Improve docs
  • Create unit tests
  • Create more loaders
  • Create option to extend a Layout
  • Implement an optional cache system for the template config
  • Implement an Template Reader with Generator/Iterator
  • Review the Unique Identification for Template Itens (array_count_values doesn't permit arrays)
  • Create a default option for encode/decode

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-06-18

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固