ReflectionMethodExtractor
class ReflectionMethodExtractor (View source)
Automatic method extraction logic for Reflection objects
This class automatically discovers and calls getter methods on Reflection objects, extracting all available data dynamically. This ensures forward compatibility when new methods are added to PHP's Reflection API.
PHP 5.6+ compatible
Methods
Extract data from a reflection object by automatically calling all getter methods
Convert extracted data to serializable format Handles Reflection objects, arrays, and primitives
Details
static array
extractData(object $reflectionObject, array $config = [])
Extract data from a reflection object by automatically calling all getter methods
static mixed
makeSerializable(mixed $value, int $depth = 0, int $maxDepth = 3)
Convert extracted data to serializable format Handles Reflection objects, arrays, and primitives
Uses ReflectionTypeRegistry for centralized type-to-adapter mapping. This eliminates hardcoded type checks and makes it easier to support new Reflection types added in future PHP versions.