PHPackages                             fivepercent/reflection - 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. fivepercent/reflection

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

fivepercent/reflection
======================

Reflection helpers

v1.0(10y ago)11.9k18MITPHPPHP &gt;=5.4

Since Jun 4Pushed 10y ago6 watchersCompare

[ Source](https://github.com/InnoGr/FivePercent-Reflection)[ Packagist](https://packagist.org/packages/fivepercent/reflection)[ RSS](/packages/fivepercent-reflection/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (8)

Reflection Helper
=================

[](#reflection-helper)

This package add helper methods for work with [PHP Reflection](http://php.net/manual/en/book.reflection.php)

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

[](#installation)

Add **FivePercent/Reflection** in your composer.json:

```
{
    "require": {
        "fivepercent/reflection": "~1.0"
    }
}
```

Now tell composer to download the library by running the command:

```
$ php composer.phar update fivepercent/reflection
```

Basic usage
-----------

[](#basic-usage)

The class `FivePercent\Component\Reflection\Reflection` is final, and can not use as object. All methods in this class statically.

Examples for work with this package:

```
use FivePercent\Component\Reflection\Reflection

// Get class reflection
$reflection = Reflection::loadClassReflection('MyClass');

// Get method reflection
$reflection = Reflection::loadMethodReflection('MyClass', 'myMethod');

// Get object reflection
$object = new MyClass();
$reflection = Reflection::loadObjectReflection($object);

// Get all properties from class
$properties = Reflection::getClassProperties('MyClass');

// Get all properties from class with gets from parents classes
$properties = Reflection::getClassProperties('MyClass', true);

// Get only private properties from class
$properties = Reflection::getClassProperties('MyClass', false, \ReflectionProperty::IS_PRIVATE);

// Set value to property in object
$object = new MyClass();
Reflection::setPropertyValue($object, 'myProperty', 'FooBar');

// Get value from property
$object = new MyClass();
$value = Reflection::getPropertyValue($object, 'myProperty');
```

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity58

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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

4001d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/16cc6c4d32a2c7f1cd584f31db9428341ad57682521f0f6e607cfe19f1f9157d?d=identicon)[inno-group](/maintainers/inno-group)

---

Top Contributors

[![ZhukV](https://avatars.githubusercontent.com/u/2256109?v=4)](https://github.com/ZhukV "ZhukV (1 commits)")

---

Tags

reflectionannotation reader

### Embed Badge

![Health badge](/badges/fivepercent-reflection/health.svg)

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

###  Alternatives

[phpdocumentor/reflection-common

Common reflection classes used by phpdocumentor to reflect the code structure

9.1k706.8M26](/packages/phpdocumentor-reflection-common)[symfony/property-access

Provides functions to read and write from/to an object or array using a simple string notation

2.8k295.3M2.5k](/packages/symfony-property-access)[phpdocumentor/reflection

Reflection library to do Static Analysis for PHP Projects

12521.4M109](/packages/phpdocumentor-reflection)[php-di/phpdoc-reader

PhpDocReader parses @var and @param values in PHP docblocks (supports namespaced class names with the same resolution rules as PHP)

7431.6M55](/packages/php-di-phpdoc-reader)[minime/annotations

The KISS PHP annotations library

229378.6k37](/packages/minime-annotations)[spatie/php-attribute-reader

A clean API for working with PHP attributes

80216.4k11](/packages/spatie-php-attribute-reader)

PHPackages © 2026

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