Download the PHP package devuri/dot-access without Composer

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

DotAccess - Convenient Access to Nested Data Using Dot Notation

The DotAccess class provides a user-friendly wrapper around the functionality of the Dflydev\DotAccessData\Data package, allowing easy access to nested data using dot notation in PHP.

Installation

  1. Ensure you have Composer installed on your system.
  2. Run the following command to install the package:

Getting Started

  1. Include the DotAccess class in your PHP script:

  2. Create an instance of the DotAccess class and pass the nested data (array or object) to the constructor:

Accessing Data

The DotAccess class provides the following methods to access the nested data using dot notation:

Get the Value

Use the get() method to retrieve the value associated with a dot notation key:

Set the Value

Use the set() method to set a value for a dot notation key:

Checking for Key Existence

Use the has() method to check if a dot notation key exists in the data:

Removing a Key

Use the remove() method to unset the value associated with a dot notation key:

Example

Wrapper Function - DataKey:get()

In addition to the DotAccess class, we also provide a standalone wrapper function DataKey that simplifies accessing nested data using dot notation.

Usage

The DataKey:get() function allows you to quickly access nested data without having to create an instance of the DotAccess class. It takes three parameters:

  1. The data array or object to access.
  2. The dot notation key to access the data.
  3. An optional default value to return if the key is not found.

Here's how you can use the DataKey:get() function:

When to Use DataKey:get() vs. DotAccess

Both the DataKey:get() function and the DotAccess class serve the same purpose: accessing nested data using dot notation. The choice between them depends on your specific use case and coding preferences.

Use DataKey:get() when:

Use DotAccess class when:

Both approaches provide a convenient and user-friendly way to work with nested data using dot notation. Choose the one that best fits your coding style and requirements.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

The DotAccess class is a simple wrapper around the Dflydev\DotAccessData\Data package, which provides the core functionality for accessing nested data using dot notation. Special thanks to the authors of the Dflydev\DotAccessData package for their excellent work.


All versions of dot-access with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4 || ^8.0
dflydev/dot-access-data Version ^3.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 devuri/dot-access contains the following files

Loading the files please wait ....