PHP Class Prooph\ServiceBus\Plugin\Router\RegexRouter

Author: Alexander Miertsch ([email protected])
Inheritance: implements Prooph\ServiceBus\Plugin\Router\MessageBusRouterPlugin, implements Prooph\Common\Event\ActionEventListenerAggregate, use trait Prooph\Common\Event\DetachAggregateHandlers
Show file Open project: prooph/service-bus Class Usage Examples

Protected Properties

Property Type Description
$patternMap
$tmpPattern string

Public Methods

Method Description
__construct ( array $patternMap = null )
attach ( Prooph\Common\Event\ActionEventEmitter $events ) : void
onRoute ( Prooph\Common\Event\ActionEvent $actionEvent )
onRouteMessage ( Prooph\Common\Event\ActionEvent $actionEvent )
route ( string $pattern )
to ( string | object | callable $handler )

Private Methods

Method Description
onRouteEvent ( Prooph\Common\Event\ActionEvent $actionEvent )
onRouteToSingleHandler ( Prooph\Common\Event\ActionEvent $actionEvent )

Method Details

__construct() public method

public __construct ( array $patternMap = null )
$patternMap array

attach() public method

public attach ( Prooph\Common\Event\ActionEventEmitter $events ) : void
$events Prooph\Common\Event\ActionEventEmitter
return void

onRoute() public method

Deprecation: Will be removed with v6.0, use method onRouteMessage instead
public onRoute ( Prooph\Common\Event\ActionEvent $actionEvent )
$actionEvent Prooph\Common\Event\ActionEvent

onRouteMessage() public method

public onRouteMessage ( Prooph\Common\Event\ActionEvent $actionEvent )
$actionEvent Prooph\Common\Event\ActionEvent

route() public method

public route ( string $pattern )
$pattern string

to() public method

public to ( string | object | callable $handler )
$handler string | object | callable

Property Details

$patternMap protected property

protected $patternMap

$tmpPattern protected property

protected string $tmpPattern
return string