Skip to content

Commit

Permalink
Merge pull request #9125 from CakeDC/3.2-static-router-calls
Browse files Browse the repository at this point in the history
make all router methods use static instead of class name.
  • Loading branch information
markstory committed Jul 17, 2016
2 parents c4fd8f7 + f467c47 commit 117288d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Routing/Router.php
Expand Up @@ -721,7 +721,7 @@ public static function reverse($params, $full = false)
$params['?'] = $url;
}

return Router::url($params, $full);
return static::url($params, $full);
}

/**
Expand All @@ -736,12 +736,12 @@ public static function reverse($params, $full = false)
public static function normalize($url = '/')
{
if (is_array($url)) {
$url = Router::url($url);
$url = static::url($url);
}
if (preg_match('/^[a-z\-]+:\/\//', $url)) {
return $url;
}
$request = Router::getRequest();
$request = static::getRequest();

if (!empty($request->base) && stristr($url, $request->base)) {
$url = preg_replace('/^' . preg_quote($request->base, '/') . '/', '', $url, 1);
Expand Down

0 comments on commit 117288d

Please sign in to comment.