paveldanilin / reflection-scanner
Installs: 852
Dependents: 2
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/paveldanilin/reflection-scanner
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))); } }