Download the PHP package decss/item-parser without Composer

On this page you can find all versions of the php package decss/item-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 item-parser

ItemParser

ItemParser is a simple PHP class for parsing Products and other records with their parameters or options (like colors, sizes etc) from CSV, present results as array or display it as html table

ItemParser Preview

Take a look at live demo

See the examples folder for usage examples

Features

Parser features:

Drawer features:

Requirements

As noted in composer.json production requirements:

Installation

Using Composer run the following on the command line:

Include Composer's autoloader file in your PHP script:

Without composer

Not recommended. To use ItemParser, you have to add a require 'itemparser.lib.php'; line. Note that you will need to require all ItemParser dependencies like ParseCsv.

Parser result

Paeser result is an array of rows (lines). Each row matches the corresponding line in the CSV and generally looks as follows:

Skipped rows can be both valid ("valid" => true) or invalid ("valid" => false) and vice versa.

As mentioned above, "fields" is an array of Field items. Each Field can be different depending on its type, config and content. All row fields will be presented in result, even if Field was not parsed or was skipped or invalid - there is no matter.

Empty field

This is an example of skipped or not configured Field:

Text field

So there is 2 Field types: text and param. Here is example of configured text Field:

"value" - is what you should to use instead of "text"

Param field and values

Next is "param" Field:

So you can see that "value" of param Field is an array. Here is example of both found [0,2] and not found [1] colors. If there is 2 or more identical colors (ie "Black; Red; Black") all fo them will be valid but duplicates will be skipped.

Usage

Parser usage

Drawer usage

Detailed usage

Create Parser and set content

You can access to Csv() instance of ParseCsv library and configure it directly:

Configure columns

See examples to get how arguments like $colors and $colorsMissing work

Configure parser options

Parsing and results

Use Drawer

Credits


All versions of item-parser with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5
ext-mbstring Version *
ext-json Version *
ext-iconv Version *
parsecsv/php-parsecsv Version ^1.2
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 decss/item-parser contains the following files

Loading the files please wait ....