From 7e2cbce9ca2d39bcf2750a70c759b9793bda54bf Mon Sep 17 00:00:00 2001 From: Frank Stelzer Date: Tue, 30 Apr 2013 09:59:29 +0300 Subject: [PATCH] fixed some variable mismatches in dynamic router docu snippets I think it should be like this :) --- cookbook/using-a-custom-route-repository.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cookbook/using-a-custom-route-repository.rst b/cookbook/using-a-custom-route-repository.rst index 348e418f..563e7d5a 100644 --- a/cookbook/using-a-custom-route-repository.rst +++ b/cookbook/using-a-custom-route-repository.rst @@ -28,17 +28,17 @@ following class provides a simple solution using an ODM Repository. public function findManyByUrl($url) { // for simplicity we retrieve one route - $myDocument = $this->findOneBy(array( + $document = $this->findOneBy(array( 'url' => $url, )); - $pattern = $myDocument->getUrl(); // e.g. "/this/is/a/url" + $pattern = $document->getUrl(); // e.g. "/this/is/a/url" $collection = new RouteCollection(); // create a new Route and set our document as // a default (so that we can retrieve it from the request) - $route = new SymfonyRoute($ep->getPath(), array( + $route = new SymfonyRoute($pattern, array( 'document' => $document, ));