PHPackages                             wallaceosmar/carion-framework - 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. wallaceosmar/carion-framework

ActiveLibrary

wallaceosmar/carion-framework
=============================

A basic singleton registry manager.

v0.0.1(3y ago)05MITPHPPHP &gt;=5.5.0

Since Dec 3Pushed 3y ago1 watchersCompare

[ Source](https://github.com/wallaceosmar/Carion-Library)[ Packagist](https://packagist.org/packages/wallaceosmar/carion-framework)[ RSS](/packages/wallaceosmar-carion-framework/feed)WikiDiscussions master Synced today

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

Carion-Framework
================

[](#carion-framework)

Carion is a simple singleton manager framework.

Installing
==========

[](#installing)

```
composer require wallaceosmar/carion-framework
```

How Use
-------

[](#how-use)

The access of the values can be due to a object value or array access.

```
require_once './vendor/autoload.php';

$carion->example = 'example';

$carion['example2'] = 'example2';

echo $cation->example;
echo $carion['example2'];
```

Seting a singleton
------------------

[](#seting-a-singleton)

Singleton is used to call some functions or instantiate custom class.

### Setting a singleton to be used later

[](#setting-a-singleton-to-be-used-later)

```
$carion = new Carion\Carion();

$carion->singleton( 'example', function () {
    return 'example';
});

echo $carion->example;
```

#### Setting a singleton with parameter

[](#setting-a-singleton-with-parameter)

The function singleton map the names of the paramter to a singleton register in the class.

```
$carion = new Carion\Carion();

$carion->set('value', 'example');

$carion->singleton( 'example', function ( $value ) {
    return $value;
});

echo $carion->example;
```

If the does`t have a value to the paramter, will be seted null as the value.

```
$carion = new Carion\Carion();

$carion->singleton( 'example', function ( $value ) {
    if ( 'example' == $value ) {
        $value = md5( $value )';
    }
    return $value;
});

echo $carion->example;
```

Calling a function or class method
----------------------------------

[](#calling-a-function-or-class-method)

You can call a function or a class method using the function call.

The function call is reponsibly to map all the paramters.

```
echo $carion->call(function( $value1, $value2 ) {
    return $value1 + $value2;
}, array( 10, 20 ));
```

Parsing a array with key name overwrite the order of values.

```
echo $carion->call(function( $value1, $value2 ) {
    return $value1 + $value2;
}, array( 10, 20, 'value1' => 0 ));
```

###  Health Score

16

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity30

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

1204d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9d9e3b7a8bcff6ce27eeed8daba912b565eee78e50107d4daf0648d5fca7f0a6?d=identicon)[wallaceosmar](/maintainers/wallaceosmar)

---

Top Contributors

[![wallaceosmar](https://avatars.githubusercontent.com/u/7277078?v=4)](https://github.com/wallaceosmar "wallaceosmar (5 commits)")

---

Tags

managesingletonregistry

### Embed Badge

![Health badge](/badges/wallaceosmar-carion-framework/health.svg)

```
[![Health](https://phpackages.com/badges/wallaceosmar-carion-framework/health.svg)](https://phpackages.com/packages/wallaceosmar-carion-framework)
```

###  Alternatives

[mlocati/ip-lib

Handle IPv4, IPv6 addresses and ranges

3116.0M35](/packages/mlocati-ip-lib)[sylius/registry

Services registry.

6110.8M29](/packages/sylius-registry)[luyadev/luya-module-admin

Administration core module for all LUYA admin modules

48177.6k22](/packages/luyadev-luya-module-admin)[africc/php-epp2

A High Level EPP (Extensible Provisioning Protocol) TCP/SSL Client for PHP

5474.6k1](/packages/africc-php-epp2)[joomla/registry

Joomla Registry Package

16446.1k20](/packages/joomla-registry)[struzik-vladislav/epp-client

PHP library for communicating with EPP(Extensible Provisioning Protocol) servers

1914.1k11](/packages/struzik-vladislav-epp-client)

PHPackages © 2026

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