Skip to content
This repository was archived by the owner on Sep 16, 2021. It is now read-only.

fixed some variable mismatches in dynamic router docu snippets #130

Merged
merged 1 commit into from
Apr 30, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions cookbook/using-a-custom-route-repository.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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,
));

Expand Down