Download the PHP package oliverde8/associative-array-simplified without Composer

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

PHP - Associative Arrays Simplified

This library allow simplified manipulation of recursive associative arrays with an object oriented aproach in php.

Latest Stable Version Build Status Scrutinizer Code Quality Code Coverage Total Downloads License

SensioLabsInsight

Associative Array

This is the main clas of the library. It allows the manipulation of the association arrays with ease.

This allow you to get data from an associative array with ease. This can be used many places even for getting information from SESSION or POST & GET values.

Typically when we try and get information from a an array of which we don't know the content we need to write a lot of conditions :

After a certain while we write a lot conditions and the array is very nested it becomes difficult to understand. This library makes it much easier to write code of this type & makes it easier to read and understand. The code above is simply replaced by :

Requirments

Installation

You should always install the library using composer.

Manual installation is not recomended and not supported.

Usage Exemples

Get values from a simple array

Get a value and if no value is set get a default one

Get nested values recursively

And of course you can continue to use default values with the recursive get.

Use separators in the string keys to get nested values

The default separator is /

You can set new values or replace them.

You can get back your array

Using custom separators

When creating the AssociativeArray you can specify the separator to use. So instead of

You can write

Example usage of static methods

The class has also static methods to manipulate your array directly. The method of the objects actually uses these static methods to manipulate the array.

And to set new data.

Other functions

The class has also other functions.

FAQ

Why don't the associative array has an iterator ?

Associative Array Simplified doesen't try and replace arrays; other libraries were designed to do so. This library simply makes it easier yo access values in associative arrays.

Why don't the associative array return associative array instead of normal array's ?

This is something I spent quite some time to decide, but doing it that way would require during the creation of the associative array to process the array to create the nested associative arrays. This would have slowned then the process of creation without really increasing perormance at any other level. On long term I might create a second object working that way.

There is some questions about this how should this work :

So there is some reflexion to be done on the subject.

Why don't the assotiative array use references ?

It's planned. Current implementation is slower as it duplicated the arrays during the set operations.

...

TODO


All versions of associative-array-simplified with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5.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 oliverde8/associative-array-simplified contains the following files

Loading the files please wait ....