Download the PHP package prowebcraft/dot without Composer

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

Dot - PHP dot notation array access

Based on adbario/php-dot-notation package

Easy access to multidimensional arrays with dot notation. With dot notation, your code is cleaner and handling deeper arrays is super easy.

This class implements PHP's ArrayAccess class, so Dot object can also be used the same way as normal arrays with additional dot notation.

With Dot you can change this:

to this:

or even this:

Installation

Via composer:

Or just copy the class file Dot.php and handle namespace yourself.

With Composer:

Manual installation:

  1. Download the latest release
  2. Extract the files into your project
  3. require_once '/path/to/dot/src/Dot.php';

Usage

This array will be used as a reference on this guide:

Create a Dot object

To start with an empty array, just create a new Dot object:

If you have an array already available, inject it to the Dot object:

Set an array after creating the Dot object:

Set an array as a reference, and all changes will be made directly to the original array:

Set a value

Set i.e. a phone number in the 'home' array:

Set multiple values at once:

If the value already exists, Dot will override it with a new value.

Get a value

Get all the stored values:

php $address = $data->pull('home.address');



Get all the stored values and remove them:

### Add a value

Multiple values at once:

### Check if a value exists

### Delete a value

Multiple values at once:

### Clear values

Delete all the values from a path:

Clear multiple paths at once:

Clear all data:

### Sort the values

You can sort the values of a given path or all the stored values.

Sort the values of a path:

Sort all the values

### Magic methods

Magic methods can be used to handle single level data (without dot notation). These examples are not using the same data array as examples above.

Set a value:

Get a value:

Check if a value exists:

Delete a value:

## License

[MIT license](LICENSE.md)

All versions of dot with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4
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 prowebcraft/dot contains the following files

Loading the files please wait ....