public function run(Callable $next, Request $request, Response $response)
    {
        $container  = Container::getInstance();
        $parameters = array_merge([
            "request"   => $request,
            "response"  => $response,
            "next"      => $next
        ], $request->getData());

        try {
            $container->call($this->action, $parameters);
            $this->emit('after', [$request, $response, $this]);
        } catch (\Exception $e) {
            $this->emit('error', [$request, $response, $e->getMessage()]);
        }
    }