Download the PHP package dominservice/onix-parser without Composer

On this page you can find all versions of the php package dominservice/onix-parser. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package onix-parser

PHP ONIX 3.0 Parser

This package is a simple PHP library for reading ONIX 3.0 files in the general formats Short and Ref. Helper functions in the individual units make it easy to read out the details that you need from the data record. Text elements in different formats as well as the different ONIX date formats are automatically parsed and can therefore be used easily.

This package is currently under development. Although most fields should be detected and parsed by the library, some fields still need more work.

Installation

PHP >=8.1

Installation is recommended to be done via composer by running:

Usage

To parse an ONIX message in XML format, a new parser is instantiated. The XML file is then passed to the parser. The result is the complete ONIX message that can now be processed.

Code Lists

The library contains all current code lists in issue 61. Codes that are specified in the ONIX file are automatically read out, so that you receive a readable version of the codes.

Let's say, you have a product in your message showing a specific NotificationType:

Multi-Language Code Lists

According to the website of the official publisher of the ONIX format, the code lists are provided in several languages. The following languages are currently supported:

Language Language Code
English (default) en
Spanish es
German de
French fr
Italian it
Norwegian nb
Turkish tr

Please note that the code lists were automatically scraped from the EDITEUR website. Therefore, some translations into the individual languages can be incorrect or partly missing. Feel free to submit a pull request with your fixed language of the code lists.

To use a specific language, just pass the language code as argument in the parser constructor:

Measurements

The PHP ONIX Parser reads all of the given Measurements from the ONIX file and assigns the correct codes for them. Using that, you can either loop through all given Measurements:

Using shorthand functions you can also search for measurements of type height, width, thickness or weight:

Built With

This library uses parts of the Symfony Serializer to parse the XML files and convert them into PHP objects.

To Do

This library is still work in progress. Here's what's coming in the next releases:

License

This project is licensed under the MIT License - see the LICENSE file for details


All versions of onix-parser with dependencies

PHP Build Version
Package Version
Requires symfony/serializer Version ^6.3
symfony/property-info Version ^6.3
symfony/property-access Version ^6.3
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package dominservice/onix-parser contains the following files

Loading the files please wait ....