yuyat / callable_to_reflector
Transforms any callable into Reflector
Installs: 37
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
pkg:composer/yuyat/callable_to_reflector
Requires
- php: >=5.3
Requires (Dev)
- phpunit/phpunit: ~4.2
This package is auto-updated.
Last update: 2025-09-25 23:14:22 UTC
README
Transforms any callable
value into Reflector
.
Usage
<?php use function callableToReflector; $reflector = callableToReflector(function ($x) { return $x; }); // => ReflectionFunction $reflector = callableToReflector('func'); // => ReflectionFunction $reflector = callableToReflector([$obj, 'method']); // => ReflectionMethod $reflector = callableToReflector(['Klass', 'method']); // => ReflectionMethod $reflector = callableToReflector($invokableObj); // => ReflectionMethod $reflector = callableToReflector('Klass::method'); // => ReflectionMethod
Author
Yuya Takeyama