Download the PHP package new-inventor/data-structure without Composer

On this page you can find all versions of the php package new-inventor/data-structure. 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 data-structure

Property bag

This utility provide to you data structure metadata and some useful classes.

With this packet you can transform arrays to needed format and load it to objects recursive.

Objects to load MUST implement Loadable or DataStructureInterface interface.

Installation

composer require new-inventor/data-structure

Examples

Metadata config

Recursive loading

You can load properties recursive by using RecursiveConstructor.

To use this you shoul add nested parameter to property like this

or

or

Namespace

It is the namespace for data structure class for recursive loading.

Validation

It is the symfony class validation config. You can pass it directly into property

Properties

It is properties of your data structure.

Property has this parameters:

If property === null(~) then default = null and no transformers and validators If property is string then default = null and default transformers = this string

transformers

Transformers is array of arrays.

In yml like this:

So you can set transformer like this:

By default transformer is inner transformer, but you can create you own and pass full class name to transformer config

Transformer can receive array or parameters and parameter can be array(1) with reserved word as key; Reserved words:

If in transformers section more than 1 transformer in same group then this transformers will be wrapped by ChainTransformer, so this identical:

and

Validation

It is the getters part of symfony validation config for given property

Default

Default can be any value and have same reserved keys as transformer parameters, but group.

Nested

It is described in Recursive loading section.

PropertiesTransformer

or you can compose PropertiesTransformer by yourself

RecursiveConstructor

This constructor construct class with metadata by recursive loading it nested classes.

Links


All versions of data-structure with dependencies

PHP Build Version
Package Version
Requires php Version ^7.1
new-inventor/php-type-checker Version ^5.0
new-inventor/transformers Version ^1.0
symfony/validator Version ^3.3
symfony/cache Version ^3.3
symfony/yaml Version ^3.3
symfony/config Version ^3.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 new-inventor/data-structure contains the following files

Loading the files please wait ....