PHPackages                             nekoos-pood/camelcase-arrayobject-mutator - 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. nekoos-pood/camelcase-arrayobject-mutator

ActiveLibrary

nekoos-pood/camelcase-arrayobject-mutator
=========================================

Object accessible as array that use keys with camelcase standard

v1.0.5(6y ago)01.7kMITPHPPHP &gt;=7.1.0CI failing

Since Sep 17Pushed 6y ago1 watchersCompare

[ Source](https://github.com/nekoos-pood/camelcase-arrayobject-mutator)[ Packagist](https://packagist.org/packages/nekoos-pood/camelcase-arrayobject-mutator)[ RSS](/packages/nekoos-pood-camelcase-arrayobject-mutator/feed)WikiDiscussions develop Synced 1mo ago

READMEChangelogDependencies (2)Versions (8)Used By (0)

CamelCase Array/Object Mutator
==============================

[](#camelcase-arrayobject-mutator)

This is a utility that allows you to use an array-object that ignores key style cases and mutate the keys as camel case style

Install
-------

[](#install)

```
composer require nekoos-pood/camelcase-arrayobject-mutator
```

Definition
----------

[](#definition)

This entity implements `ArrayObject` see [Documentation](https://www.php.net/manual/en/class.arrayobject.php)

Usage
-----

[](#usage)

```
use NekoOs\Pood\Support\CamelCaseArrayObjectMutator;
```

### Basic use

[](#basic-use)

```
$thing = new CamelCaseArrayObjectMutator([
  'this is first item with increment key',
  'associative-key' => 'this is item with associative key'
]);

$thing->snake_case   = 'this is item with key using snake case';
$thing['kebab-case'] = 'this is item with key using kebab case';
$thing[]             = 'this is item with key using increment key';

$thing['snake_case']    // return 'this is item with key using snake case'
$thing['kebab-case']    // return 'this is item with key using kebab case'
$thing[0]               // return 'this is first item with increment key'
$thing[1]               // return 'this is item with key using increment key'
$thing['kebab-case']    // return 'this is item with key using kebab case'
$thing['snakeCase']     // return 'this is item with key using snake case'
$thing['kebabCase']     // return 'this is item with key using kebab case'
$thing->snake_case      // return 'this is item with key using snake case'
$thing->snakeCase       // return 'this is item with key using snake case'
$thing->kebabCase       // return 'this is item with key using kebab case'
$thing->undefined       // throw error 'Undefined property: NekoOs\Pood\Support\CamelCaseArrayObjectMutator::$undefined'

get_object_vars($thing) // return array (
                         //   'associativeKey' => 'this is item with associative key',
                         //   'snakeCase'      => 'this is item with key using snake case',
                         //   'kebabCase'      => 'this is item with key using kebab case',
                         // )
```

The object ignores the case styles of the keys

```
$thing->snakeCase    = 'replace value with key using snake case'
$thing['kebabCase']  = 'replace value with key using kebab case'

$thing['snake_case']    // return 'replace value with key using snake case'
$thing['kebab-case']    // return 'replace value with key using kebab case'
$thing['snakeCase']     // return 'replace value with key using snake case'
$thing['kebabCase']     // return 'replace value with key using kebab case'
$thing->snake_case      // return 'replace value with key using snake case'
$thing->snakeCase       // return 'replace value with key using snake case'
$thing->kebabCase       // return 'replace value with key using kebab case'
```

### How to get the values with original indexes?

[](#how-to-get-the-values-with-original-indexes)

```
$thing->getStorage()
```

### Custom use

[](#custom-use)

```
// change behavior from instance as object common without mutation of keys
$thing->behavior(CamelCaseArrayObjectMutator::PREFER_ORIGINAL_KEYS);

get_object_vars($thing) // return array (
                         //   'associative-key' => 'this is item with associative key',
                         //   'snake_case'      => 'this is item with key using snake case',
                         //   'kebab-case'      => 'this is item with key using kebab case',
                         // )
```

#### Global configuration

[](#global-configuration)

```
// change behavior by default as object common without mutation of keys
CamelCaseArrayObjectMutator::defaultBehavior(CamelCaseArrayObjectMutator::PREFER_ORIGINAL_KEYS);

// Enabled throw errors by default on undefined fields
CamelCaseArrayObjectMutator::defaultBehavior(CamelCaseArrayObjectMutator::DEBUG_ON_UNDEFINDED);
// Disabled throw errors by default on undefined fields
CamelCaseArrayObjectMutator::defaultBehavior(~CamelCaseArrayObjectMutator::DEBUG_ON_UNDEFINDED);
```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

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 ~21 days

Recently: every ~26 days

Total

6

Last Release

2321d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5f6943e57a600055ce38141834bb9616c01b189c3770a07e9a990a49b92e3619?d=identicon)[NekoOs](/maintainers/NekoOs)

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/nekoos-pood-camelcase-arrayobject-mutator/health.svg)

```
[![Health](https://phpackages.com/badges/nekoos-pood-camelcase-arrayobject-mutator/health.svg)](https://phpackages.com/packages/nekoos-pood-camelcase-arrayobject-mutator)
```

PHPackages © 2026

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