| 1 | <?php |
||
| 5 | use Doctrine\Common\Annotations\AnnotationReader; |
||
| 6 | use RecursiveDirectoryIterator; |
||
| 7 | use RecursiveIteratorIterator; |
||
| 8 | use ReflectionClass; |
||
| 9 | use WyriHaximus\Tactician\CommandHandler\Annotations\Handler; |
||
| 10 | |||
| 11 | final class Mapper |
||
| 12 | { |
||
| 13 | public static function map($path, $namespace) |
||
| 47 | |||
| 48 | public static function mapInstanciated($path, $namespace) |
||
| 49 | { |
||
| 50 | $mapping = []; |
||
| 51 | |||
| 52 | foreach (self::map($path, $namespace) as $command => $handler) { |
||
| 53 | $mapping[$command] = new $handler(); |
||
| 59 |