public function getRouteCollectionForRequest(Request $request)
    {
        $slug = '/' . trim($request->getPathInfo(), '/');
        $document = $this->repository->findOneBy(array('slug' => $slug));

        $collection = new RouteCollection();

        if ($document) {
            $controller = $this->templateControllers[$document->getTemplate()];
            $route = new Route(
                $document->getSlug(),
                array(
                    '_controller' => $controller,
                    'document' => $document
                )
            );

            $collection->add('test', $route);
        }

        return $collection;
    }