Compare commits

..

3 Commits

Author SHA1 Message Date
Simon Sessingø 358b25d4f1 Merge pull request #73 from skipperbent/development
Development
2016-03-18 17:55:31 +01:00
Simon Sessingø 5483ffe458 [TASK] Readded group match inheritence .
- Settings on routes now have higher priority when merging settings from
  group.
2016-03-18 17:43:57 +01:00
Simon Sessingø 6d8e95fcaa [TASK] Match on group are no longer merged to child routes. 2016-03-18 15:21:45 +01:00
2 changed files with 13 additions and 1 deletions
+12
View File
@@ -154,4 +154,16 @@ class Request {
return $this->loadedRoute;
}
public function isFormatAccepted($format) {
return (isset($_SERVER['HTTP_ACCEPT']) && stripos($_SERVER['HTTP_ACCEPT'], $format) > -1);
}
public function getAcceptFormats() {
if(isset($_SERVER['HTTP_ACCEPT'])) {
return explode(',', $_SERVER['HTTP_ACCEPT']);
}
return array();
}
}
+1 -1
View File
@@ -201,7 +201,7 @@ abstract class RouterEntry {
*/
public function addSettings(array $settings = null) {
if(is_array($settings)) {
$this->settings = array_merge($this->settings, $settings);
$this->settings = array_merge($settings, $this->settings);
}
return $this;
}