Created
December 5, 2013 07:47
-
-
Save piotrpasich/7801614 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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