[OPTIMISATION] Optimisations + bugfixes.

- Fixed references to Pecee framework.
- Fixed variables not being initialised before usage.
- Cleaned up duplicate checks.
- Other small optimisations and bugfixes.
This commit is contained in:
Simon Sessingø
2015-12-11 18:06:52 +01:00
parent cede827a45
commit 0bec524606
8 changed files with 33 additions and 24 deletions
+3 -3
View File
@@ -26,9 +26,9 @@ class RouterRoute extends RouterEntry {
// Match on custom defined regular expression
if($this->regexMatch) {
$parameters = array();
if(preg_match('/('.$this->regexMatch.')/is', request()->getHost() . $url, $parameters)) {
if(preg_match('/('.$this->regexMatch.')/is', $request->getHost() . $url, $parameters)) {
$this->parameters = (!is_array($parameters[0]) ? array($parameters[0]) : $parameters[0]);
return $this;
return true;
}
return null;
}
@@ -46,7 +46,7 @@ class RouterRoute extends RouterEntry {
$this->parameters = $parameters;
}
return $this;
return true;
}
return null;