Download the PHP package exayer/vdf-converter without Composer

On this page you can find all versions of the php package exayer/vdf-converter. 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 vdf-converter

VDF Converter

Tests Latest Stable Version

A memory efficient parser for the Valve Data Format (*.vdf) written in PHP. Fully supports the VDF specification, except for the #include macro.

Requirements

PHP 7 or later. No production dependencies.

Install

You can install the package via composer:

Usage

Convert VDF to generator/array

Let's say we are parsing the following VDF:

It can be parsed in one of these ways (based on input source):

To get the data you need to iterate over generator using foreach

Or simply convert it to array

Duplicate key handling

Some VDFs are known to contain duplicate keys. To keep the result structure the same as the VDF and since the parser is generator based (not keeping in memory pairs) the duplicated key will be modified - the counter will be concatenated to the end (e.g. key__[2]).

Customizing key format

If you want to customize the formatting key process, you can create your own custom formatter. A formatter is any class that implements EXayer\VdfConverter\UniqueKey\Formatter.

This is what that interface looks like.

After creating your formatter, you can specify its class name in the uniqueKeyFormatter method of the EXayer\VdfConverter\VdfConverterConfig object. The config can be passed as second argument to any from builder method. Your formatter will then be used by default for all duplicate key handling calls.

Warning: Do not create formatters that create a key like __2, as some VDFs may have keys in this format.

Testing

Features to implement

Inspiration

The code is inspired by @halaxa package json-machine. Thank you!

License

The MIT License (MIT). Please see License File for more information.


All versions of vdf-converter with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0
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 exayer/vdf-converter contains the following files

Loading the files please wait ....