PHPackages                             onemustcode/hydrator - 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. onemustcode/hydrator

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

onemustcode/hydrator
====================

Hydrator to map or extract an extract object

v0.1.1(9y ago)027.2k1MITPHPPHP &gt;=5.6.4

Since Jan 30Pushed 9y ago1 watchersCompare

[ Source](https://github.com/onemustcode/hydrator)[ Packagist](https://packagist.org/packages/onemustcode/hydrator)[ RSS](/packages/onemustcode-hydrator/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (1)Dependencies (2)Versions (3)Used By (0)

Hydrator
========

[](#hydrator)

Simple to use hydrator to hydrate an object from array or extract an object to an array.

Usage
-----

[](#usage)

To install the hydrator use the following command;

```
composer require onemustcode/hydrator

```

### Hydrating

[](#hydrating)

To hydrate an object you can use the hydrate method;

```
$object = new Object(); // The object to hydrate
$data = ['some_field' => 'some_value', 'boolean_field' => true];
$object = $hydrator->hydrate($object, $data);
```

### Extracting

[](#extracting)

To extract an object to an array you can use the extract method;

```
$array = $hydrator->extract($object);
```

### Todo

[](#todo)

- Add strategies
- Add unit tests

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

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

Total

2

Last Release

3318d ago

### Community

Maintainers

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

---

Top Contributors

[![blackvault-bv](https://avatars.githubusercontent.com/u/25415479?v=4)](https://github.com/blackvault-bv "blackvault-bv (2 commits)")

---

Tags

arrayobjectmaphydrator

### Embed Badge

![Health badge](/badges/onemustcode-hydrator/health.svg)

```
[![Health](https://phpackages.com/badges/onemustcode-hydrator/health.svg)](https://phpackages.com/packages/onemustcode-hydrator)
```

###  Alternatives

[symfony/property-access

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

2.8k295.3M2.5k](/packages/symfony-property-access)[cuyz/valinor

Dependency free PHP library that helps to map any input into a strongly-typed structure.

1.5k9.2M108](/packages/cuyz-valinor)[aimeos/map

Easy and elegant handling of PHP arrays as array-like collection objects similar to jQuery and Laravel Collections

4.2k412.9k11](/packages/aimeos-map)[jasny/dotkey

Dot notation access for objects and arrays

14219.5k6](/packages/jasny-dotkey)[graze/data-structure

Data collections and containers

12287.4k8](/packages/graze-data-structure)[michaldudek/foundation

A set of useful PHP classes.

13111.9k13](/packages/michaldudek-foundation)

PHPackages © 2026

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