paveldanilin / reflection-scanner

Scans directory for class reflection info

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Reflection Scanner

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)));
    }
}

About

Scans directory for class reflection info


Languages

Language:PHP 100.0%