PHPackages                             netherphp/object - 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. netherphp/object

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

netherphp/object
================

Self-Sealing Stem Object

v4.1.16(3y ago)03.3k↓66.7%9BSD-2-ClausePHPPHP &gt;=8.0CI failing

Since Dec 31Pushed 3y agoCompare

[ Source](https://github.com/netherphp/object)[ Packagist](https://packagist.org/packages/netherphp/object)[ RSS](/packages/netherphp-object/feed)WikiDiscussions redux Synced 3d ago

READMEChangelogDependencies (3)Versions (52)Used By (9)

**Nether Object (netherphp/object)**
====================================

[](#nether-object-netherphpobject)

[![Packagist](https://camo.githubusercontent.com/de1f8870df6e4b6095188aabf9f1e48bdb5ceec63dda4aa5f7c7d299cf593891/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6e65746865727068702f6f626a6563742e7376673f7374796c653d666f722d7468652d6261646765)](https://packagist.org/packages/netherphp/object)[![Build Status](https://camo.githubusercontent.com/d959116de461964c873c186427252b72e56b28d1aa76a8ec57c08e651b8a2a76/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6e65746865727068702f6f626a6563742f706870756e69742e796d6c3f7374796c653d666f722d7468652d6261646765)](https://github.com/netherphp/object/actions)[![codecov](https://camo.githubusercontent.com/7447bc5a7d414ece342f1691554b3818acd150bf95df11cd322014b24dab0e8f/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f67682f6e65746865727068702f6f626a6563743f7374796c653d666f722d7468652d626164676526746f6b656e3d5651433438584e425332)](https://codecov.io/gh/netherphp/object)

This package provides some utilities to aid with some low level work.

---

NOTE: ALL OF THIS LIBRARY HAS BEEN MERGED INTO `Nether\Common` and should no longer be used.

**Class Overview**
------------------

[](#class-overview)

### `Nether\Object\Prototype`

[](#netherobjectprototype)

The Prototype Object is a self-sealing stem object capable of remapping schemas and ensuring that properties exist with default values if needed. Using this class as the parent enables the attribute based functionality all the way down.

Extending this class automatically grants a constructor designed to handle being given a pile of data, generally from something like a row of data from the database. It will look at what the class is expecting for the properties and make sure the data gets typecast prior to assignment to help avoid typing errors.

*Simple Example:*

```
class BaseObject
extends Nether\Object\Prototype {
	public int $ID;
	public string $Name;
}

$RowFromDB = [ 'ID'=> 1, 'Name'=> 'Bob' ];
$Obj = new BaseObject($RowFromDB);
```

- More Documentation

---

### `Nether\Object\Datastore`

[](#netherobjectdatastore)

Provides an array-like object so that items can be stored like arrays but manipulated with chainable methods. It implements `Iterable`, `ArrayAccess`, and `Countable` as well as having a bunch of methods for working on the data as a single collection.

*Simple Example:*

```
$Data = new Nether\Object\Datastore([
	1, 2, 3,
	4, 5, 6
]);

// strip out odd numbers
// then sort it big to small
// then show me what we got.

print_r(
	$Data
	->Filter(fn(int $Val)=> ($Val % 2) == 0)
	->Sort(fn(int $A, int $B)=> $B  $A)
	->Values()
);

// Array
// (
//    [0] => 6
//    [1] => 4
//    [2] => 2
// )
```

- More Documentation:

---

**Trait Overview**
------------------

[](#trait-overview)

### Class/Method/Property Info Packages.

[](#classmethodproperty-info-packages)

These traits when bolted onto any class provided static helper methods for reading all sorts of information about that class and its members, including the PHP 8 attributes, to aid in metaprogramming tasks. Classes which extend `Prototype` already have these applied.

### `Nether\Object\Package\ClassInfoPackage`

[](#netherobjectpackageclassinfopackage)

*Simple Example:*

```
class MyClass {

	use
	Nether\Object\Package\ClassInfoPackage;

}

$ClassInfo = MyClass::GetClassInfo();

print_r($ClassInfo);
```

- Documentation: uri-to-wikipage

### `Nether\Object\Package\MethodInfoPackage`

[](#netherobjectpackagemethodinfopackage)

*Simple Example:*

```
class MyClass {

	use
	Nether\Object\Package\MethodInfoPackage;

	public function
	GetID():
	int {

		return 0;
	}

}

$Methods = MyClass::GetMethodIndex();

foreach($Methods as $Method) {
	print_r($Method);
}
```

- Documentation: uri-to-wikipage

### `Nether\Object\Package\PropertyInfoPackage`

[](#netherobjectpackagepropertyinfopackage)

*Simple Example:*

```
class MyClass {

	use
	Nether\Object\Package\PropertyInfoPackage;

	public int
	$ID = 0;

}

$Props = MyClass::GetPropertyIndex();

foreach($Props as $Prop) {
	print_r($Prop);
}
```

- Documentation: uri-to-wikipage

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity81

Battle-tested with a long release history

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

Recently: every ~54 days

Total

49

Last Release

1170d ago

Major Versions

v1.0.3 → v2.0.02016-02-26

v2.1.9 → v3.0.02017-08-18

v3.0.12 → v4.0.02021-01-06

PHP version history (4 changes)v1.0.0PHP &gt;=5.4.0

v2.0.0PHP &gt;=7.0.0

v3.0.0PHP &gt;=7.1.0

v4.0.0PHP &gt;=8.0

### Community

Maintainers

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

---

Top Contributors

[![bobmagicii](https://avatars.githubusercontent.com/u/881944?v=4)](https://github.com/bobmagicii "bobmagicii (160 commits)")

---

Tags

netherphpphpobject

### Embed Badge

![Health badge](/badges/netherphp-object/health.svg)

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

###  Alternatives

[yzen.dev/plain-to-class

Class-transformer to transform your dataset into a structured object

16293.9k6](/packages/yzendev-plain-to-class)

PHPackages © 2026

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