Fixed conflicts added since latest commits

This commit is contained in:
mcndave committed 2020-03-31 11:03:02 -04:00
1 parent 3044b919bc
commit bf3816c3db
3 files changed
+16 -5

No files matched your search

+3 -3
View File
@@ -49,12 +49,12 @@ class Request implements Extension {
return $variableName === null ? $this->request->getParsedBody() : static::arrayGet($this->request->getParsedBody(), $variableName) ?? $default;
}
public function request(? string $variableName = null)
public function request(? string $variableName = null, $default = null)
{
return $variableName === null ? array_merge(get(null), post(null)) : $this->post($variableName) ?? $this->get($variableName);
return $variableName === null ? array_merge(get(null), post(null)) : $this->post($variableName) ?? $this->get($variableName) ?? $default;
}
public function server(? string $variableName = null)
public function server(? string $variableName = null, $default = null)
{
return $variableName === null ? $this->request->getServerParams() : static::arrayGet($this->request->getServerParams(), $variableName) ?? $default;
}