yuyat / callable_to_reflector
Transforms any callable into Reflector
v0.9.0
2014-10-13 14:19 UTC
Requires
- php: >=5.3
Requires (Dev)
- phpunit/phpunit: ~4.2
This package is auto-updated.
Last update: 2024-11-25 21:28:27 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