PHPackages                             cygnite/array-manipulator - 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. cygnite/array-manipulator

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

cygnite/array-manipulator
=========================

Array Element Reader As String Path

v1.3(10y ago)118MITPHPPHP &gt;=5.4.0

Since Jun 7Pushed 10y ago2 watchersCompare

[ Source](https://github.com/cygnite/array-manipulator)[ Packagist](https://packagist.org/packages/cygnite/array-manipulator)[ RSS](/packages/cygnite-array-manipulator/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)DependenciesVersions (4)Used By (0)

array-manipulator
=================

[](#array-manipulator)

Cygnite Array Manipulator component used for simple array manipulation and reading array value using simple string path.

\#Installation

Array Manipulator uses Composer for installation. For installing composer documentation, please refer to getcomposer.org. Add following into your composer.json.

```
"cygnite/array-manipulator" : "1.*"

```

\#Usage

Cygnite array accessor used to read values from multi multidimensional array. It helps when you want to beautify your syntax and easy to access values. You can read values as below.

\#Example

```
$array = [
         'profile' => [
             "experience"  => [
                 "field" => "Web Development",
                 "technology"    => "PHP"
             ]
         ]
     ];
$arrayAccessor = (new ArrayAccessor())->set($array);
echo $arrayAccessor->toString('profile.experience.field'); // output: Web Development

```

In some cases your array key may contains dot(.) which will make system confused whether it should look for next key or same. In such cases while getting value you need to provide key as underscore or dash prefix as below.

```
$array2 = [
         'profile' => [
             "experience"  => [
                 "technology.version"  => "Welcome to PHP v5.4"
             ]
         ]
     ];
$arrayAccessor = (new ArrayAccessor())->set($array1);
echo $arrayAccessor->toString('profile.experience.technology_version'); // output: Welcome to PHP v5.4

```

\#Getting default value if array element not exists

```
$array3 = [
         'profile' => [
             "experience"  => '4 Years'
         ]
     ];
$arrayAccessor = (new ArrayAccessor())->set($array3);
echo $arrayAccessor->toString('profile.experience.area', 'Application Development'); // output 5 years

```

Using Closure Syntax
====================

[](#using-closure-syntax)

```
$array4 = [
         'profile' => [
             "author"  => 'Sanjoy Dey'
         ]
     ];
$arrayAccessor = ArrayAccessor::make(function($a) use ($array4)
{
    return $a->set($array4);
});
echo $arrayAccessor->toString('profile.author');

```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 90% 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 ~0 days

Total

3

Last Release

3999d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3f03b96fbe064feed9dd7b419fcce0ec4dc4a96e6d0a3e97be731c4374f1c609?d=identicon)[cygnite](/maintainers/cygnite)

---

Top Contributors

[![sanjoydesk](https://avatars.githubusercontent.com/u/1744493?v=4)](https://github.com/sanjoydesk "sanjoydesk (9 commits)")[![deysanjoy0-eng](https://avatars.githubusercontent.com/u/280507467?v=4)](https://github.com/deysanjoy0-eng "deysanjoy0-eng (1 commits)")

---

Tags

Cygnitearray accessorArray manipulationArray Reading As Path

### Embed Badge

![Health badge](/badges/cygnite-array-manipulator/health.svg)

```
[![Health](https://phpackages.com/badges/cygnite-array-manipulator/health.svg)](https://phpackages.com/packages/cygnite-array-manipulator)
```

###  Alternatives

[andreas-glaser/php-helpers

A comprehensive collection of PHP utility functions for array manipulation, string operations, date handling, HTML generation, form building, validation, and more. Modern PHP 8.2+ library with full type safety.

1386.5k2](/packages/andreas-glaser-php-helpers)[mascame/arrayer

Array manipulation with dot notation. Also prepares an array to be put in a file. Very useful for config files.

141.4k2](/packages/mascame-arrayer)

PHPackages © 2026

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