Download the PHP package andydune/array-container without Composer

On this page you can find all versions of the php package andydune/array-container. 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 array-container

ArrayContainer

Build Status Packagist Version Total Downloads

It offers convenient interface for encapsulated array. Implements strategy template for any number of filters.

Requirements

Installation

Installation using composer:

Or if composer was not installed globally:

Or edit your composer.json:

And execute command:

Simple access to array

You do not need to worry about existence any key.

Filters

Filters are callable objects. Filters are used during request properties with getters.

Modifiers

Modifier is an object of class witch implements AndyDune\ArrayContainer\Action\AbstractAction interface. It can be simple extented without modification main class.

Add keys to array if not exist.

There is source array:

You need to use it inside model. Model waits array with keys: type, key and value

Result array is:

Array shift maintaining key to data correlations.

It is source array with numeric keys.

After execution function array_shift keys will be lost.

Array container action helps to avoid it.

Result array is:

Add value to nested array

We have array structure of witch we don't know. Need to set value to it's nested value with check of existence of nested structure. It changes only given array keys.

Ome more example.

We have stait array with month, year and counts of entities within this date.

We need to recieve something like this:

Here is code for this:

Remove from array duplicated values

It needs simple to remove values witch duplicates. Here how we can do it.

Check is value in nested array

There is nested value with any structure. It checks is some value in given array including values in nested arrays.

Values can be changed before comparision:

Create new array with values from current array

It needs to create new list of values from any fixed list. The new list must contain random values.

It leaves keys in new array as it was in source array.

Concat arrays

Function array_merge may act not right with associative arrays.

Example down next:

Concat action helps to do it right:

Computes the difference of arrays with additional index check

Compares array1 against array2 and more and returns the difference. It computes arrays recursively.

It may ignore some keys within result.

Check is array has only fixed keys

It checks source array if it has only this keys.

Create integer array with values not in sequence

There is an array with integer values we have. Values are mixed, not in order and can be duplicated. We can receive array with values witch were skipped.

Find max float value in array

It searches max float value in the given array. Each value is prepared by removing spaces.

Access array with path notation

Access to array value (more if array is nested) may require validation and check. Path helps make it easily.

Set value inside nested array:

Build array

MultilineTextToAssociatedArray

It creates array from text with lines as key-values pairs in it.

MultilineTextAsJsonToAssociatedArray

It creates array from text with lines as json-like key-values pairs in it.

MarkdownTableToArray

It creates array from Markdown table.

Read about format here

You can build not assoc array like this:

MultilineTextToNestedAssociatedArray

It creates array from text with lines as key-values pairs in it. Values are nested arrays.

StringExplode

It does simple string explode procedure with removing empty values or not.


All versions of array-container with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1
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 andydune/array-container contains the following files

Loading the files please wait ....