PHPackages                             denshade/object\_method\_listener - 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. denshade/object\_method\_listener

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

denshade/object\_method\_listener
=================================

A object method decorator

17PHP

Since Aug 30Pushed 11y ago1 watchersCompare

[ Source](https://github.com/denshade/ObjectMethodListener)[ Packagist](https://packagist.org/packages/denshade/object_method_listener)[ RSS](/packages/denshade-object-method-listener/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependenciesVersions (1)Used By (0)

**What is it?**

This is an implementation of a method listener in php. This allows for extending the behaviour of your classes without having them extend specific classes.

Classic composition is used to wrap the object, all method calls are caught so you can extend the behaviour none the less.

Features contain:

- Make any object ReadOnly, making all setters throw UnsupportedExceptions.
- Generate stack traces for every method call and log it to a log file.
- ...

**How it works**

Simply wrap your object like so:

This will trace the observed object. If you interested in recording all of the accessors of a method(s).

> $object = ObjectMutation::wrapAsTraceObserver($object, $outFile);

This will make the observed object readOnly.

> $object = ObjectMutation::wrapAsReadonlyObject($object);

You can also make your own implementations of method listeners.

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/78bf30941fca0a6bbdb1b337a9ac97913e5650fea88b47c3ec3b3d69d2bb02b3?d=identicon)[denshade](/maintainers/denshade)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/denshade-object-method-listener/health.svg)

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

###  Alternatives

[secl-group/phpcs-secl-standard

A PHP\_CodeSniffer maintainability standard for Secl Group applications

149.7k](/packages/secl-group-phpcs-secl-standard)[novatree/wallet

Simple Wallet

272.5k](/packages/novatree-wallet)

PHPackages © 2026

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