PHPackages                             exposer/class-exposer - 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. exposer/class-exposer

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

exposer/class-exposer
=====================

Allows access to a classes private methods and properties

v1.0.0(10y ago)224MITPHP

Since Aug 22Pushed 10y ago1 watchersCompare

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

READMEChangelog (1)Dependencies (1)Versions (3)Used By (0)

Access a PHP Classes Private &amp; Protected Methods &amp; Properties
=====================================================================

[](#access-a-php-classes-private--protected-methods--properties)

Why?
----

[](#why)

Useful for testing private and protected methods in a class.

\##Installation

You can simply download or copy &amp; paste the ClassExposer.php class and include it in your own php files.

### Composer

[](#composer)

Also available via Composer:

`$ composer require exposer/class-exposer`

Make sure you have minimum-stability set to 'dev' in your composer.json file.

Usage
-----

[](#usage)

```
// Include the ClassExposer Class
require_once 'ClassExposer.php';
// Pass an object instance in to the ClassExposer
$myExposedClass = new Exposer\ClassExposer(new MyClass());

// Access all methods and properties as normal
$myExposedClass->myPrivateMethod();
$myExposedClass->myPrivateProperty = "foo";
echo $myExposedClass->myPrivateProperty;

```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity64

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

Every ~0 days

Total

2

Last Release

3922d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/791b31f6b625d43874f70831846b002b7bb46dc911e38b02250e7aaab6596716?d=identicon)[craigh411](/maintainers/craigh411)

---

Top Contributors

[![craigh411](https://avatars.githubusercontent.com/u/13747552?v=4)](https://github.com/craigh411 "craigh411 (22 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/exposer-class-exposer/health.svg)

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

###  Alternatives

[jbzoo/composer-diff

See what has changed after a composer update.

53888.9k1](/packages/jbzoo-composer-diff)

PHPackages © 2026

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