PHP: How to get all classes when using autoloader
<p>I'm using composer to generate autoloader:</p>

<pre><code>"autoload": {
  "psr-4": {
    "SomeNamespace\\": "src/SomeDir"
  }
}
</code></pre>

<p>I need to create instances of all classes that implement specific interface. <a href="https://stackoverflow.com/a/3994642">It's fairly easy</a> when not using autoloader, however <code>get_declared_classes()</code> is not playing well with autoloaders. It will list a class only after it was instantiated with autoloader.</p>