public static function create($commandToHandlerMap)
    {
        $handlerMiddleware = new CommandHandlerMiddleware(
            new ClassNameExtractor(),
            new InMemoryLocator($commandToHandlerMap),
            new HandleInflector()
        );

        $lockingMiddleware = new LockingMiddleware();

        return new CommandBus([$lockingMiddleware, $handlerMiddleware]);
    }
public static function create($commandToHandlerMap)
    {
        $handlerMiddleware = new CommandHandlerMiddleware(
            new ClassNameExtractor(),
            new InMemoryLocator($commandToHandlerMap),
            new HandleInflector()
        );

        $lockingMiddleware = new LockingMiddleware();

        return new CommandBus([$lockingMiddleware, $handlerMiddleware]);
    }
public static function create ( $ commandToHandlerMap ) { $ handlerMiddleware = new CommandHandlerMiddleware ( new ClassNameExtractor ( ) , new InMemoryLocator ( $ commandToHandlerMap ) , new HandleInflector ( ) ) ; $ lockingMiddleware = new LockingMiddleware ( ) ; return new CommandBus ( [ $ lockingMiddleware , $ handlerMiddleware ] ) ; }
Creates a default CommandBus that you can get started with.

@param array $commandToHandlerMap

@return CommandBus
Creates a default CommandBus that you can get started with .