Merge pull request #15 from skipperbent/development

[BUGFIX] Bugfixes and optimisations
This commit is contained in:
Simon Sessingø
2015-10-25 02:35:49 +02:00
3 changed files with 4 additions and 6 deletions
+1 -1
View File
@@ -20,7 +20,7 @@
}, },
"autoload": { "autoload": {
"psr-4": { "psr-4": {
"Pecee\\": "src/" "Pecee\\": "src/Pecee/"
} }
} }
} }
+1 -2
View File
@@ -54,12 +54,11 @@ class Response {
/** /**
* Json encode array * Json encode array
* @param array $value * @param array $value
* @return self $this
*/ */
public function json(array $value) { public function json(array $value) {
$this->header('Content-type: application/json'); $this->header('Content-type: application/json');
echo json_encode($value); echo json_encode($value);
return $this; die();
} }
/** /**
+2 -3
View File
@@ -90,8 +90,8 @@ class RouterRoute extends RouterEntry {
} }
} }
// Add parameter value // Add parameter value, if it doesn't exist - replace it with null value
$parameters[$parameter] = $parameterValue; $parameters[$parameter] = ($parameterValue === '') ? null : $parameterValue;
} }
} }
} }
@@ -160,5 +160,4 @@ class RouterRoute extends RouterEntry {
return parent::setSettings($settings); return parent::setSettings($settings);
} }
} }