webit/comarch-edi-order 问题修复 & 功能扩展

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

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

webit/comarch-edi-order

最新稳定版本:4.0.1

Composer 安装命令:

composer require webit/comarch-edi-order

包简介

Comarch EDI Order Lib

README 文档

README

This library provides the object oriented representation of the Comarch EDI Order document along with its the XML parser.

Installation

The most convenient method is using Composer. Add the following line to the required section of your composer.json

"webit/comarch-edi-order": "^2.0.0"

Usage

XML Parser

<?php
use Doctrine\Common\Annotations\AnnotationRegistry;

// Configure the AnnotationRegistry
$autoload = include 'vendor/autoload.php'; 
AnnotationRegistry::registerLoader(array($autoload, 'loadClass'));

$xmlParserBuilder = new \Webit\Comarch\EDI\Order\Parser\XmlParserBuilder();
$xmlParserBuilder->setCacheDir(sys_get_temp_dir()); // recommended to set the cache dir for the inner Serializer

/** @var \Webit\Comarch\EDI\Order\Parser\XmlParser $xmlParser */
$xmlParser = $xmlParserBuilder->build();

$myOrder = file_get_contents('my-edi-order.xml');

/** @var \Webit\Comarch\EDI\Order\DocumentOrder $documentOrder */
$documentOrder = $xmlParser->parse($myOrder);

XML File Parser

Optionally you can wrap the XMLParser with the XMLFileParser

<?php

/** @var \Webit\Comarch\EDI\Order\Parser\XmlParser $xmlParser */

$xmlFileParser = new \Webit\Comarch\EDI\Order\Parser\XmlFileParser($xmlParser);
$documentOrder = $xmlFileParser->parse(new \SplFileInfo('my-edi-order.xml'));

Supported document versions

The current implementation supports version 2.2 as states in the spec

Running the tests

./vendor/bin/phpunit

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-02-23

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固