getOutput() публичный Метод

Throws ResourceUndefinedException if output router is not found.
public getOutput ( ) : Kraken\Channel\Router\RouterInterface | Kraken\Channel\Router\RouterCompositeInterface
Результат Kraken\Channel\Router\RouterInterface | Kraken\Channel\Router\RouterCompositeInterface
Пример #1
0
 /**
  * @param ChannelInterface $channel
  */
 protected function applyConsoleController(ChannelInterface $channel)
 {
     $router = $channel->getInput();
     $router->addDefault(new RuleHandler(function ($params) {
     }));
     $router = $channel->getOutput();
     $router->addDefault(new RuleHandler(function ($params) use($channel) {
         $channel->push($params['alias'], $params['protocol'], $params['flags'], $params['success'], $params['failure'], $params['cancel'], $params['timeout']);
     }));
 }
 /**
  * @param ChannelCompositeInterface $channel
  * @param ChannelInterface $console
  */
 private function applyConsoleRouting(ChannelCompositeInterface $channel, ChannelInterface $console)
 {
     $master = $channel->getBus('master');
     $router = $console->getInput();
     $router->addDefault(new RuleHandler(function ($params) use($master) {
         $master->receive($params['alias'], $params['protocol']);
     }));
     $router = $console->getOutput();
     $router->addDefault(new RuleHandler(function ($params) use($channel) {
         $channel->push($params['alias'], $params['protocol'], $params['flags'], $params['success'], $params['failure'], $params['cancel'], $params['timeout']);
     }));
 }