Skip to content

Instantly share code, notes, and snippets.

@piotrpasich
Created December 5, 2013 07:47
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 piotrpasich/7801614 to your computer and use it in GitHub Desktop.
Save piotrpasich/7801614 to your computer and use it in GitHub Desktop.
<?php
//Save the Route
class Router {
/** ... **/
public static function connect($route, $defaults = array(), $options = array());
/** ... **/
}
?>
<?php
//Match the url
class CakeRoute {
public function match($url) {
/** ... **/
// Missing defaults is a fail.
if (array_diff_key($defaults, $url) !== array()) {
return false;
}
/** ... **/
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment