PHPackages                             dschoenbauer/dot-notation - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. dschoenbauer/dot-notation

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

dschoenbauer/dot-notation
=========================

Given a complicated data structure, this library allows easy and safe access to data via dot notation. This library is a compilation of other Dot Notation libraries, taking the best feature from each.

1.2.1(9y ago)11.1k[4 issues](https://github.com/dschoenbauer/dot-notation/issues)2MITPHPPHP &gt;=5.6.0

Since Nov 26Pushed 9y ago1 watchersCompare

[ Source](https://github.com/dschoenbauer/dot-notation)[ Packagist](https://packagist.org/packages/dschoenbauer/dot-notation)[ RSS](/packages/dschoenbauer-dot-notation/feed)WikiDiscussions develop Synced today

READMEChangelog (6)Dependencies (2)Versions (9)Used By (2)

Dot Notation
============

[](#dot-notation)

[![Build Status](https://camo.githubusercontent.com/1796f8149013c6ff76c7d8666e1736f034f7904a2b8e8227122c58e089bdb8d7/68747470733a2f2f7472617669732d63692e6f72672f647363686f656e62617565722f646f742d6e6f746174696f6e2e7376673f6272616e63683d646576656c6f70)](https://travis-ci.org/dschoenbauer/dot-notation)[![Coverage Status](https://camo.githubusercontent.com/a6ca3f8f4820bcc565da8e113410414886365d885d951e9d84152719be451737/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f647363686f656e62617565722f646f742d6e6f746174696f6e2f62616467652e7376673f6272616e63683d646576656c6f70)](https://coveralls.io/github/dschoenbauer/dot-notation?branch=develop)[![License](https://camo.githubusercontent.com/0eada10f0f32f62ecacd0091f84c9981196e7e1b36e1c20393bcf36ba8ccfeb9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f647363686f656e62617565722f646f742d6e6f746174696f6e2e737667)](https://github.com/dschoenbauer/dot-notation)[![Downloads](https://camo.githubusercontent.com/cb6643b5fe3d7acfb14e290f620ff817295dd88adda18a314e13821a433ad7a6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f647363686f656e62617565722f646f742d6e6f746174696f6e2e737667)](https://packagist.org/packages/dschoenbauer/dot-notation)[![Version](https://camo.githubusercontent.com/f72429cef44f3ade0328c615cbde14f47038ed28d4b476969bf3a32b601e5c82/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f647363686f656e62617565722f646f742d6e6f746174696f6e2e737667)](https://github.com/dschoenbauer/dot-notation/releases)

[![License](https://camo.githubusercontent.com/0eada10f0f32f62ecacd0091f84c9981196e7e1b36e1c20393bcf36ba8ccfeb9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f647363686f656e62617565722f646f742d6e6f746174696f6e2e737667)](https://github.com/dschoenbauer/dot-notation)[![Downloads](https://camo.githubusercontent.com/cb6643b5fe3d7acfb14e290f620ff817295dd88adda18a314e13821a433ad7a6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f647363686f656e62617565722f646f742d6e6f746174696f6e2e737667)](https://packagist.org/packages/dschoenbauer/dot-notation)[![Version](https://camo.githubusercontent.com/f72429cef44f3ade0328c615cbde14f47038ed28d4b476969bf3a32b601e5c82/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f647363686f656e62617565722f646f742d6e6f746174696f6e2e737667)](https://github.com/dschoenbauer/dot-notation/releases)

Purpose
-------

[](#purpose)

Simplifies access to large array structures

Installation
------------

[](#installation)

```
    composer require dschoenbauer/dot-notation

```

Testing
-------

[](#testing)

```
    ./vendor/bin/phpunit tests

```

Example
-------

[](#example)

```
use DSchoenbauer\DotNotation\ArrayDotNotation;

$mongoConnection = [
    'mongo' => [
        'default' => [  'user' => 'username', 'password' => 's3cr3t' ]
    ]
];
$config = new ArrayDotNotation($mongoConnection);
        --- or ---
$config = ArrayDotNotation::with($mongoConnection);

```

### GET

[](#get)

```
// Get plain value
$user = $config->get('mongo.default.user');
/*
    $user = 'username';
*/

// Get array value
$mongoDefault = $config->get('mongo.default');
/*
    $mongoDefault = ['user' => 'username', 'password' => 's3cr3t'];
*/

```

### SET

[](#set)

```
$configDump = $config->set('mongo.numbers', [2, 3, 5, 7, 11])->getData();
/*
    $configDump = [
        'mongo' => [
            'default' => [  'user' => 'username', 'password' => 's3cr3t' ],
            'numbers' => [2, 3, 5, 7, 11]
        ],
        'title' => 'Dot Notation'
    ];
*/

```

### MERGE

[](#merge)

```
$configDump = $config->merge('mongo.default', ['user' => 'otherUser','active' => true])->getData();
/*
    $configDump = [
        'mongo' => [
           'default' => [  'user' => 'otherUser', 'password' => 's3cr3t','active' => true ]
        ],
        'title' => 'Dot Notation'
    ];
*/

```

### REMOVE

[](#remove)

```
$configDump = $config->remove('mongo.default.user')->getData();
/*
    $configDump = [
        'mongo' => [
           'default' => [  'password' => 's3cr3t' ]
        ],
        'title' => 'Dot Notation'
    ];
*/

```

### NOTATION TYPE

[](#notation-type)

```
// Tired of dots? Change it.
$user = $config->setNotationType(',')->get('mongo,default,user');
/*
    $user = 'username';
*/

```

### WITH

[](#with)

```
//Functional fluent fun
$user = ArrayDotNotation::with($mongoConnection)->get('mongo.default.user');
/*
    $user = 'username';
*/

```

### HAS

[](#has)

```
// Validates that the dot notation path is present in the data.
$isPresent = $config->has('mongo,default,user');
/*
    $isPresent = true;
*/

```

###  Health Score

27

↓

LowBetter than 47% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~31 days

Recently: every ~39 days

Total

6

Last Release

3348d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ae8bbfa347804db9df5bd9e69b7e3228f94fe30c41fd8714f764bed2cf567654?d=identicon)[dschoenbauer](/maintainers/dschoenbauer)

---

Top Contributors

[![dschoenbauer](https://avatars.githubusercontent.com/u/1693875?v=4)](https://github.com/dschoenbauer "dschoenbauer (21 commits)")

---

Tags

composerdot-notationpackagistpsr-4arraydotdataaccessnotation

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/dschoenbauer-dot-notation/health.svg)

```
[![Health](https://phpackages.com/badges/dschoenbauer-dot-notation/health.svg)](https://phpackages.com/packages/dschoenbauer-dot-notation)
```

###  Alternatives

[dflydev/dot-access-data

Given a deep data structure, access data by dot notation.

722393.7M110](/packages/dflydev-dot-access-data)[symfony/property-access

Provides functions to read and write from/to an object or array using a simple string notation

2.8k317.3M3.2k](/packages/symfony-property-access)[league/config

Define configuration arrays with strict schemas and access values with dot notation

565335.0M36](/packages/league-config)[jbzoo/data

An extended version of the ArrayObject object for working with system settings or just for working with data arrays

851.6M23](/packages/jbzoo-data)[flow-php/array-dot

PHP ETL - Array Dot functions

14514.6k6](/packages/flow-php-array-dot)[hi-folks/data-block

Data class for managing nested arrays and JSON data.

1462.9k](/packages/hi-folks-data-block)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
