PHPackages                             pointybeard/property-bag - 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. pointybeard/property-bag

ActiveLibrary

pointybeard/property-bag
========================

Set of classes for managing key/value pairs.

1.0.3(7y ago)1730↑900%2MITPHPPHP &gt;=5.6.6

Since Sep 22Pushed 7y ago1 watchersCompare

[ Source](https://github.com/pointybeard/property-bag)[ Packagist](https://packagist.org/packages/pointybeard/property-bag)[ RSS](/packages/pointybeard-property-bag/feed)WikiDiscussions master Synced today

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

Property Bag
============

[](#property-bag)

- Version: v1.0.0
- Date: Sept 22 2018
- [Release notes](https://github.com/pointybeard/property-bag/blob/master/CHANGELOG.md)
- [GitHub repository](https://github.com/pointybeard/property-bag)

[![Latest Stable Version](https://camo.githubusercontent.com/d96b1402db5193140432b81aecdcb5520905680df206d91cfb39d56e43089fb6/68747470733a2f2f706f7365722e707567782e6f72672f706f696e747962656172642f70726f70657274792d6261672f76657273696f6e)](https://packagist.org/packages/pointybeard/property-bag) [![License](https://camo.githubusercontent.com/c2d7719682a492dba0c08931f7a3726b149d378b9580d03d93bd0317f391999a/68747470733a2f2f706f7365722e707567782e6f72672f706f696e747962656172642f70726f70657274792d6261672f6c6963656e7365)](https://packagist.org/packages/pointybeard/property-bag)

Simplifies the task of storing key/value pairs.

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

[](#installation)

Property Bag is installed via [Composer](http://getcomposer.org/). To install, use `composer require pointybeard/property-bag` or add `"pointybeard/property-bag": "~1.0"` to your `composer.json` file.

Usage Example
=============

[](#usage-example)

Here is a quick and dirty example of how to use this group of classes

```

include "vendor/autoload.php";

use pointybeard\PropertyBag\Lib;

$p = new Lib\PropertyBag;

$p->fruit = "apple";
$p->animal = new Lib\Property("animal", "lion");
$p->clothing = new Lib\ImmutableProperty("clothing", "hat");

var_dump($p);

$p->fruit = "banana";
var_dump($p->fruit, $p->animal->value);

try{
    $p->clothing = "belt";
    var_dump($p->clothing);

} catch (Lib\Exceptions\AttemptToChangeImmutablePropertyException $ex) {
    print "Oh oh! You can't change Immutable property 'clothing'" . PHP_EOL;
}

print_r($p->toArray());

$p2 = new Lib\PropertyBag;
$p2->username = "barry";
$p2->password = "blahblah";

$p->credentials = $p2;

var_dump(
    $p->toArray(),
    $p->credentials->value->username,
    $p->credentials->value->username->value
);

```

Support
-------

[](#support)

If you believe you have found a bug, please report it using the [GitHub issue tracker](https://github.com/pointybeard/property-bag/issues), or better yet, fork the library and submit a pull request.

Contributing
------------

[](#contributing)

We encourage you to contribute to this project. Please check out the [Contributing documentation](https://github.com/pointybeard/property-bag/blob/master/CONTRIBUTING.md) for guidelines about how to get involved.

License
-------

[](#license)

"Property Bag" is released under the [MIT License](http://www.opensource.org/licenses/MIT).

###  Health Score

29

—

LowBetter than 63% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

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

Total

4

Last Release

2688d ago

### Community

Maintainers

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

### Embed Badge

![Health badge](/badges/pointybeard-property-bag/health.svg)

```
[![Health](https://phpackages.com/badges/pointybeard-property-bag/health.svg)](https://phpackages.com/packages/pointybeard-property-bag)
```

PHPackages © 2026

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