public function __construct($doStopMessageDispatch = false) { parent::__construct("message.test", 0, function (Message $message, MessageDispatcher $dispatcher) use($doStopMessageDispatch) { $message->getResponseList()->add($message->getName() . " processed"); if ($doStopMessageDispatch) { $message->stop(); } }); }
public function __construct(RouteCollection $routeCollection) { parent::__construct(Messages::COLLECT_ROUTES, 0, function (Message $message, MessageDispatcher $dispatcher) use($routeCollection) { $message->getResponseList()->add($routeCollection); }); }
public function __construct() { parent::__construct("message.test", 0, function (Message $message, MessageDispatcher $dispatcher) { $dispatcher->dispatch($message); }); }