public function on ($type, callable $listener)
    {
        $args = array_slice(func_get_args(), 2);
        
        $this->emitter->addListener(
            $type,
            function (EventInterface $event, Input\Input $input, Reply\Handler $replyHandler) use ($args, $listener) {
                call_user_func_array($listener, array_merge([$input, $replyHandler], $args));
            }
        );
    }
public function on ($type, callable $listener)
    {
        $args = array_slice(func_get_args(), 2);
        
        $this->emitter->addListener(
            $type,
            function (EventInterface $event, Input\Input $input, Reply\Handler $replyHandler) use ($args, $listener) {
                call_user_func_array($listener, array_merge([$input, $replyHandler], $args));
            }
        );
    }
public function on ( $ type , callable $ listener ) { $ args = array_slice ( func_get_args ( ) , 2 ) ; $ this -> emitter -> addListener ( $ type , function ( EventInterface $ event , Input \ Input $ input , Reply \ Handler $ replyHandler ) use ( $ args , $ listener ) { call_user_func_array ( $ listener , array_merge ( [ $ input , $ replyHandler ] , $ args ) ) ; } ) ; }
Adds an event listener for the given input type.

@param          $type
@param callable $listener
Adds an event listener for the given input type .