PHPackages                             lithemod/orbis - 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. lithemod/orbis

ActiveLibrary

lithemod/orbis
==============

A powerful class manager for effortless instance handling in PHP!

v1.0.0(1y ago)03472MITPHP

Since Oct 2Pushed 1y agoCompare

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

READMEChangelogDependencies (1)Versions (2)Used By (2)

Lithe Orbis
===========

[](#lithe-orbis)

✨ **Lithe Orbis** is a powerful class for managing class instances easily and efficiently in PHP!

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

[](#installation)

You can install **Lithe Orbis** using Composer. Run the following command in your terminal:

```
composer require lithemod/orbis
```

Usage
-----

[](#usage)

### Registering an Instance

[](#registering-an-instance)

To register an instance of a class, you can use the `register` method. Here's an example:

```
use Lithe\Orbis\Orbis;

class MyClass {
    public function sayHello() {
        return "Hello, World!";
    }
}

// Register a new instance without a key
Orbis::register(MyClass::class);

// Get the registered instance
$instance = Orbis::instance(MyClass::class);
echo $instance->sayHello(); // Output: Hello, World!
```

#### Registering with a Key

[](#registering-with-a-key)

You can also register an instance using a custom key:

```
$myObject = new MyClass();
Orbis::register($myObject, 'myCustomKey');

// Get the instance using the custom key
$instance = Orbis::instance('myCustomKey');
echo $instance->sayHello(); // Output: Hello, World!
```

### Unregistering an Instance

[](#unregistering-an-instance)

If you need to remove a registered instance, you can use the `unregister` method:

```
Orbis::unregister(MyClass::class);
```

### Getting an Instance with Unregistration

[](#getting-an-instance-with-unregistration)

The `instance` method has a second optional parameter that, when set to `true`, will unregister the instance upon returning it. Here's how it works:

```
// Register the instance
Orbis::register(MyClass::class);

// Get and unregister the instance
$instance = Orbis::instance(MyClass::class, true);
echo $instance->sayHello(); // Output: Hello, World!

// The instance is now unregistered
```

### Common Errors

[](#common-errors)

- **Class not registered**: If you try to get an instance that hasn’t been registered, an error will be thrown.
- **Instance already registered**: Attempting to register an instance with an existing key will throw an error.

Contribution
------------

[](#contribution)

Contributions are welcome! Feel free to submit a pull request or open an issue.

License
-------

[](#license)

This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance36

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 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

Unknown

Total

1

Last Release

593d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/56173de3a7bf7099dd8168efd730d3c2fb5df5174a123fdc37cee8c3589e2345?d=identicon)[williamhumbwavali](/maintainers/williamhumbwavali)

---

Top Contributors

[![williamhumbwavali](https://avatars.githubusercontent.com/u/127023095?v=4)](https://github.com/williamhumbwavali "williamhumbwavali (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/lithemod-orbis/health.svg)

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

PHPackages © 2026

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