mirror of
https://github.com/skipperbent/simple-php-router.git
synced 2026-06-17 00:37:52 +00:00
@@ -20,6 +20,17 @@ abstract class LoadableRoute extends RouterEntry implements ILoadableRoute {
|
||||
*/
|
||||
public function setUrl($url) {
|
||||
$this->url = '/' . trim($url, '/') . '/';
|
||||
|
||||
if(preg_match_all('/' . static::PARAMETERS_REGEX_MATCH . '/is', $this->url, $matches)) {
|
||||
|
||||
if (count($matches[1])) {
|
||||
foreach (array_keys($matches[1]) as $key) {
|
||||
$this->parameters[$key] = null;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user