public function setResponder($type, ResponderInterface $responder)
    {
        if (!is_string($type) || empty($type)) {
            throw new \InvalidArgumentException('The responder type is invalid');
        }

        $this->responders[$type] = $responder;
    }
public function setResponder($type, ResponderInterface $responder)
    {
        if (!is_string($type) || empty($type)) {
            throw new \InvalidArgumentException('The responder type is invalid');
        }

        $this->responders[$type] = $responder;
    }
public function setResponder ( $ type , ResponderInterface $ responder ) { if ( ! is_string ( $ type ) || empty ( $ type ) ) { throw new \ InvalidArgumentException ( 'The responder type is invalid' ) ; } $ this -> responders [ $ type ] = $ responder ; }
Assigns the responder to the given type.

@param string $type The type of responder
@param \FlameCore\EventObserver\Responder\ResponderInterface $responder The responder to assign
@throws \InvalidArgumentException if the responder type is invalid.
Assigns the responder to the given type .