X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Furlmapper.php;h=931b5c3c2a1cf554a5f35ac7229d7e2fa59a0c82;hb=90e93b9656ac56e85cc52943541b046df2874a44;hp=d17493e21d5a8cfd645cecbf57da84eea3304b94;hpb=59043dca7fb6f974b11797c4d0f20e5b78b0611d;p=quix0rs-gnu-social.git diff --git a/lib/urlmapper.php b/lib/urlmapper.php index d17493e21d..931b5c3c2a 100644 --- a/lib/urlmapper.php +++ b/lib/urlmapper.php @@ -66,7 +66,7 @@ class URLMapper throw new Exception(sprintf("Can't connect %s; path has no action.", $path)); } - $allpaths[] = $path; + $this->allpaths[] = $path; $action = $args[self::ACTION]; @@ -92,7 +92,7 @@ class URLMapper } } - $regex = $this->makeRegex($path, $paramPatterns); + $regex = self::makeRegex($path, $paramPatterns); $this->variables[] = array($args, $regex, $paramNames); @@ -123,7 +123,7 @@ class URLMapper } } - throw new Exception(sprintf('No match for path "%s"', $path)); + throw new NoRouteMapException($path); } function generate($args, $qstring, $fragment) @@ -207,7 +207,7 @@ class URLMapper return $match['name']; } - protected function makeRegex($path, $paramPatterns) + static function makeRegex($path, $paramPatterns) { $pr = new PatternReplacer($paramPatterns);