Skip to content

Commit

Permalink
Update the Tactician Docs to Reflect the Actual Handler
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisguitarguy committed Aug 26, 2016
1 parent 5306640 commit bef6911
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions docs/handlers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -120,15 +120,7 @@ League. You can use it to do message handling with the queue.
use PMG\Queue\DefaultConsumer;
use PMG\Queue\Handler\TaticianHandler;
// use the same commang bus instance each time
$handler = TaticianHandler::fromCommandBus(new CommandBus(/*...*/));
// or you can provide a factory callback to create the command bus
// on demand for each handle This is useful if you're using the
// `PcntlForkingHandler` to handle messages in separate processes
$handler = new TacticianHandler(function (array $optionsPassedToHandle) {
return new CommandBus(/*...*/);
});
$handler = new TacticianHandler(new CommandBus(/* ... */));
/** @var PMG\Queue\Driver $driver */
$consumer = new DefaultConsumer($driver, $handler);
Expand Down

0 comments on commit bef6911

Please sign in to comment.