[BUGFIX] Bugfixes

This commit is contained in:
Simon Sessingø
2015-10-07 00:14:59 +02:00
parent 02a874d01c
commit 2ff88f9ed4
5 changed files with 140 additions and 73 deletions
+15 -1
View File
@@ -70,7 +70,7 @@ abstract class RouterEntry {
* @return self
*/
public function setPrefix($prefix) {
$this->prefix = trim($prefix, '/');
$this->prefix = '/' . trim($prefix, '/') . '/';
return $this;
}
@@ -139,12 +139,26 @@ abstract class RouterEntry {
return $settings;
}
/**
* @param array $settings
* @return self
*/
public function addSettings(array $settings) {
array_merge($this->settings, $settings);
return $this;
}
/**
* @param array $settings
* @return self
*/
public function setSettings($settings) {
$this->settings = $settings;
if($settings['prefix']) {
$this->setPrefix($settings['prefix']);
}
return $this;
}