Download the PHP package agrandesr/arrays without Composer

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

Arrays

Arrays is a composer library designed to make easy some actions withs arrays.

How to start 🚀

Follow the next steps to use Arrays, you will see that is very easy to use.

Prerequisites 📋

You will need to have installed php and composer in your computer.

Installation 🔧

You need to require the package to your project.

Next, you can use in your code. We encourage to use in the root file index.php. It is important to write under the autoload require.

The result will be:

There is a easy example to test!

Like you can see it is very easy to add Arrays into your project. In the Documentation section you will be able to see the functions of the Utils components and there use.

Documentation

All the functions of Arrays are static. Now you can see each function, how to use and the utility.

Future I will try to make an easy video tutorial to make easy the first steps with this library.

pathSet()

This function allows to us to upsert a value into an array using a path route. The default value separator of the Arrays functions is the dot (.), but you can change this separator with the method setPathSeparator() that you can check in this documentation. With this function you can save time when you want to update a unique field of a big multidimensional array.

Parameters

Like you see, all the route is created. For this case is better directly, but in loops that you don't know if the path exist or not can be very usefull to avoid problems with array offset.

You can also change the value in arrays with content.

pathGet()

This function allows to us to get the value in an array using a path route. The default value separator of the Arrays functions is the dot (.), but you can change this separator with the method setPathSeparator() that you can check in this documentation. With this function you can save time when you want to get a array in a loop or in a function that you are not going to be sure if is going to exist and the deep of multidimensional array.

Parameters

Examples

setUnidimensional()

This function transform a multidimensional array with path keys to a unidimensional array with a path. You can add a prefix to the key paths.

Parameters

Parameters

Examples

Aditional information

Versioning: 📌

For all available versions, see the tags in this repository.

Authors ✒️

You can also look at the list of all [contributors] (https://github.com/your/project/contributors) who have participated in this project.

License 📄

This project is under the License MIT - read the file LICENSE.md for more details.

Thanks to: 🎁


All versions of arrays with dependencies

PHP Build Version
Package Version
No informations.
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 agrandesr/arrays contains the following files

Loading the files please wait ....