monomelodies / reflex
Reflection utilities for PHP8+
0.3.8
2023-04-22 13:45 UTC
Requires
- php: >=8.1
Requires (Dev)
- phpunit/phpunit: ^9.5
README
Reflection utilities for PHP8+
Reflex offers extensions for PHP's built in reflection classes. These offer extra functionality for reflections, while respecting their respective contracts.
Installation
$ composer require monomelodies/reflex
Monomelodies\Reflex\ReflectionClass
Wrapper for ReflectionClass
.
The AnyCallable
class
<?php use Reflex\AnyCallable; $reflection = AnyCallable::reflect($someCallable);
This method returns the correct reflection for any type of callable (function or method). It also takes into account that in PHP, an abstract method is not considered callable.