Download the PHP package uuur86/dalue without Composer

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

Dalue - PHP Data Mapper

The Dalue library provides a powerful, recursive, and memory-efficient method for data mapping and structural transformation in PHP. It allows you to ingest complex, unstructured data sets (like API responses or raw JSON payloads) and map them directly into strict domain models, NoSQL item structures, or specific array formats while optionally mutating the values during the allocation phase.

It eliminates the need for repetitive array traversal, nested loops, and deep conditional type casting in your application layer.

Requirements

Installation

You can install the package via Composer:

How It Works

Dalue relies on a defined schema array where you specify the target structure. It supports:

  1. Dot/Path Notation: Using the @data/ prefix, you can fetch deeply nested values instantly. Use /* wildcard notation to extract columns across array items (e.g., @data/items/*/sku).
  2. Recursive Array Mapping: You can define nested arrays in your target schema.
  3. Collection Merging ([] notation): Automatically resolves and merges has_many relationships into structured row arrays.
  4. On-the-fly Mutation: Allows passing a callback function to manipulate keys and values (e.g., formatting dates, prefixing keys, casting types) during the mapping loop.

Basic Usage: Transforming a Dataset

Below is a basic example of extracting specific data from a deep array. Use StringObjects::instance() to ingest array or JSON payloads.

Output:


Advanced Usage: Type Casting & Callbacks

You can perform complex transformations by providing a callback function as the third parameter. This is especially useful for formatting strings, rounding floats, or mutating specific fields during mapping.


Real-World Example: Adapting API JSON for AWS DynamoDB

NoSQL databases like AWS DynamoDB require strict type markers (e.g., S for String, N for Number, L for List, M for Map). Dalue cleanly maps complex webhook structures into clean domain models, which can then be formatted into DynamoDB AttributeValue format using AWS SDK's Marshaler.

Scenario:

We receive an e-commerce webhook payload and need to format it for a DynamoDB PutItem operation.


LICENSE

This project is licensed under the GPL-3.0-or-later License. See the LICENSE file for more details.

AUTHOR

Uğur Biçer - @uuur86

CONTRIBUTING

If you want to contribute to this project, you can send pull requests. We expect all contributors to follow our Code of Conduct.

CONTACT

You can contact me via email: [email protected]

BUGS

You can report bugs via GitHub issues.

SECURITY

If you find a security issue, please report it via email: [email protected]

DONATE

If you want to support me, you can donate via GitHub sponsors: https://github.com/sponsors/uuur86

SEE ALSO


All versions of dalue with dependencies

PHP Build Version
Package Version
Requires php Version >=7.2
ext-json Version *
ext-mbstring Version *
uuur86/strobj Version ^2.1.7
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 uuur86/dalue contains the following files

Loading the files please wait ...