Skip to content

Instantly share code, notes, and snippets.

@dbu
Created November 23, 2012 10:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dbu/4134887 to your computer and use it in GitHub Desktop.
Save dbu/4134887 to your computer and use it in GitHub Desktop.
// match method becomes
public function matchRequest(Request $request)
{
$defaults = $this->nestedMatcher->matchRequest($request);
foreach ($this->enhancers as $enhancer) {
$defaults = $enhancer->enhance($defaults, $request);
}
return $defaults;
}
interface RouteEnhancerInterface
{
/**
* Change the defaults based on rules.
*
* @return array the modified defaults
*/
public function enhance(array $defaults, Request $request);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment