public function dispatch($url, Request $request, Response $response) {
        $output = $this->resolveOutput($url, $request->isAjax());

        if(is_object($output)) {
            if($output instanceof ElementInterface) {
                $response->addHeader("X-Loops-ID", $output->getLoopsId());
            }

            $output = $this->display($output, $request, $response);
        }

        $response->setHeader();

        return $output;
    }