PHP code example of paveldanilin / reflection-scanner
1. Go to this page and download the library: Download paveldanilin/reflection-scanner library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
paveldanilin / reflection-scanner example snippets
$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)));
}
}