paveldanilin / reflection-scanner
v0.0.1
2021-11-28 09:53 UTC
Requires
- php: >=7.4
- doctrine/annotations: 1.13.*
- symfony/finder: ^4.4|^5.0
README
Scans directories for class reflection info.
Supports DocBlock annotations (Doctrine annotation).
Example:
$scanner = new \Pada\Reflection\Scanner\Scanner(); /** @var \Pada\Reflection\Scanner\ClassInfo $classInfo */ foreach ($scanner->in('../vendor') as $classInfo) { print "----------------------------\n"; print "File:" . $classInfo->getFilename() . "\n"; print "Class:" . $classInfo->getReflection()->getShortName() . "\n"; foreach ($classInfo->getMethodNames() as $methodName) { print $classInfo->getReflection()->getShortName() . '.' . $methodName . "\n"; print_r(\iterator_to_array($classInfo->getMethodAnnotations($methodName))); } }