Reverting changing Router::compile(); to private method. Since this method is called using an instance of the Router we can still remove code that called Router::getInstance();

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7738 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
phpnut 2008-10-12 14:23:16 +00:00
parent 404e4ed2c6
commit a170464d3c

View file

@ -421,7 +421,7 @@ class Router extends Object {
foreach ($_this->routes as $i => $route) {
if (count($route) === 3) {
$route = $_this->__compile($i);
$route = $_this->compile($i);
}
if (($r = $_this->__matchRoute($route, $url)) !== false) {
@ -529,9 +529,9 @@ class Router extends Object {
*
* @param integer $i
* @return array Returns an array containing the compiled route
* @access private
* @access public
*/
function __compile($i) {
function compile($i) {
$route = $this->routes[$i];
if (!list($pattern, $names) = $this->writeRoute($route[0], $route[1], $route[2])) {
@ -821,7 +821,7 @@ class Router extends Object {
foreach ($_this->routes as $i => $route) {
if (count($route) === 3) {
$route = $_this->__compile($i);
$route = $_this->compile($i);
}
$originalUrl = $url;