public function addResponder($actions, $responder, array $data = null)
    {
        if (!$responder instanceof ResponderInterface && !is_callable($responder)) {
            throw new \InvalidArgumentException('The $responder parameter must be either a ResponderInterface object or a callable');
        }

        $actions = (array) $actions;

        foreach ($actions as $action) {
            if (!is_string($action) || empty($action)) {
                throw new \InvalidArgumentException('The action name is invalid');
            }

            $this->responders[$action][] = $responder;

            if (isset($data)) {
                $this->data[$action] = $data;
            }
        }
    }