Prooph\ServiceBus\Container\AbstractBusFactory::__callStatic PHP Method

__callStatic() public static method

In case you want to use another config key than provided by the factories, you can add the following factory to your config: [CommandBusFactory::class, 'other'], ];
public static __callStatic ( string $name, array $arguments ) : mixed
$name string
$arguments array
return mixed
    public static function __callStatic($name, array $arguments)
    {
        if (!isset($arguments[0]) || !$arguments[0] instanceof ContainerInterface) {
            throw new InvalidArgumentException(sprintf('The first argument must be of type %s', ContainerInterface::class));
        }
        return (new static($name))->__invoke($arguments[0]);
    }