PHP Class Prooph\ServiceBus\Container\AbstractBusFactory

Author: Alexander Miertsch ([email protected])
Inheritance: implements Interop\Config\RequiresConfigId, implements Interop\Config\ProvidesDefaultOptions, use trait Interop\Config\ConfigurationTrait
Show file Open project: prooph/service-bus Class Usage Examples

Public Methods

Method Description
__callStatic ( string $name, array $arguments ) : mixed Creates a new instance from a specified config, specifically meant to be used as static factory.
__construct ( string $configId )
__invoke ( Interop\Container\ContainerInterface $container ) : MessageBus Create service.
defaultOptions ( )
dimensions ( )

Protected Methods

Method Description
getBusClass ( ) : string Returns the FQCN of a bus extending Prooph\ServiceBus\MessageBus
getDefaultRouterClass ( ) : string Returns the default router class to use if no one was specified in the config

Private Methods

Method Description
attachPlugins ( MessageBus $bus, array $utils, Interop\Container\ContainerInterface $container )
attachRouter ( MessageBus $bus, array $routerConfig, Interop\Container\ContainerInterface $container )

Method Details

__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

__construct() public method

public __construct ( string $configId )
$configId string

__invoke() public method

Create service.
public __invoke ( Interop\Container\ContainerInterface $container ) : MessageBus
$container Interop\Container\ContainerInterface
return Prooph\ServiceBus\MessageBus

defaultOptions() public method

public defaultOptions ( )

dimensions() public method

public dimensions ( )

getBusClass() abstract protected method

Returns the FQCN of a bus extending Prooph\ServiceBus\MessageBus
abstract protected getBusClass ( ) : string
return string

getDefaultRouterClass() abstract protected method

Returns the default router class to use if no one was specified in the config
abstract protected getDefaultRouterClass ( ) : string
return string