PHPackages                             vbpupil/attributes - 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. vbpupil/attributes

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

vbpupil/attributes
==================

A simple Attributes mechanism which makes managing attributes easy.

2.0(7y ago)012[1 PRs](https://github.com/vbpupil/attributes/pulls)MITPHPCI passing

Since Feb 25Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/vbpupil/attributes)[ Packagist](https://packagist.org/packages/vbpupil/attributes)[ RSS](/packages/vbpupil-attributes/feed)WikiDiscussions master Synced 2d ago

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

Quality Assurance
-----------------

[](#quality-assurance)

[![PHP 5.6](https://camo.githubusercontent.com/88093c79af42bd3c07f4d6aa378289e1f5450411c56753b0323bd7d8b9b1f9ee/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d352e362d626c75652e737667)](https://camo.githubusercontent.com/88093c79af42bd3c07f4d6aa378289e1f5450411c56753b0323bd7d8b9b1f9ee/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d352e362d626c75652e737667)[![Build Status](https://camo.githubusercontent.com/4cdaa50efcac8a664d0bed3bee604ba505d4321d0bda91ce34887201363e9436/68747470733a2f2f7472617669732d63692e6f72672f7662707570696c2f617474726962757465732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/vbpupil/attributes)[![Code Climate](https://camo.githubusercontent.com/32875e91f2771ae30538bf6e20289e271e5e7de6f6afd2165ba764119fa73352/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f7662707570696c2f617474726962757465732f6261646765732f6770612e737667)](https://codeclimate.com/github/vbpupil/attributes)[![License: MIT](https://camo.githubusercontent.com/784362b26e4b3546254f1893e778ba64616e362bd6ac791991d2c9e880a3a64e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d677265656e2e737667)](https://opensource.org/licenses/MIT)

Attributes
==========

[](#attributes)

A simple Attributes mechanism that makes keeping track of settings a lot more manageable.

Sample Usage
------------

[](#sample-usage)

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

use vbpupil\Attributes;
use vbpupil\Attribute;

//create individual attribute
$attr = new Attribute(['foo'=>'bar']);
$attr->getKey();
$attr->getValue();

//create a new bunch of attributes
try {
    $attrs = new Attributes(
        [
            new Attribute(['product_code'=>'126FGE']),
            new Attribute(['sell_price'=>3.80]),
            new Attribute(['buy_price'=>1.90])
        ],
        [
            'product_code'
        ]
    );
} catch (\Exception $e) {

}

$attrs->getAttribute('product_code');
$attrs->getAttribute('product_code')->getValue();
```

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance57

Moderate activity, may be stable

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity63

Established project with proven stability

 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

2683d ago

### Community

Maintainers

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

---

Top Contributors

[![vbpupil](https://avatars.githubusercontent.com/u/2638990?v=4)](https://github.com/vbpupil "vbpupil (7 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/vbpupil-attributes/health.svg)

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

###  Alternatives

[morrislaptop/laravel-route-menu

Your route:list, sir.

584.1k](/packages/morrislaptop-laravel-route-menu)

PHPackages © 2026

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