I have a Symfony bundle that generate reports. In that bundle I have a namespace (folder) in which I store all reports as files. Each file is a class with some reports specific methods. All works good, but I'm looking for a good way to get list of all the classes in that namespace to create the index of all the reports available. I know there is Symfony Finder bundle, but is that the best way, or is there a better way to make a collection of all classes in a namespace.
Asked
Active
Viewed 1,124 times
1
-
you can be inspired by what composer does when it dump the autoloader, https://github.com/composer/composer/blob/96bf605b31e15130f56aa524795a75b351896e25/src/Composer/Autoload/AutoloadGenerator.php#L223 – Federkun Nov 12 '16 at 15:24
-
Thanks Federkun, good suggestion, between finder and class as variable I got it to work quite easily. – xfloys2112 Nov 13 '16 at 00:00