Quick fix to DefaultRegistration
This commit is contained in:
parent
dcb22fe086
commit
3044b919bc
|
@ -78,6 +78,7 @@ class DefaultRegistrations implements LanguageRegistration
|
||||||
|
|
||||||
public function registerExtension(Compiler $compiler) : void
|
public function registerExtension(Compiler $compiler) : void
|
||||||
{
|
{
|
||||||
|
$compiler->registerExtension(new \Picea\Extension\PhpExtension());
|
||||||
$compiler->registerExtension(new \Picea\Extension\JsonExtension($this->context));
|
$compiler->registerExtension(new \Picea\Extension\JsonExtension($this->context));
|
||||||
$compiler->registerExtension(new \Picea\Extension\AssetExtension());
|
$compiler->registerExtension(new \Picea\Extension\AssetExtension());
|
||||||
|
|
||||||
|
|
|
@ -48,17 +48,13 @@ class Request implements Extension {
|
||||||
{
|
{
|
||||||
return $variableName === null ? $this->request->getParsedBody() : static::arrayGet($this->request->getParsedBody(), $variableName) ?? $default;
|
return $variableName === null ? $this->request->getParsedBody() : static::arrayGet($this->request->getParsedBody(), $variableName) ?? $default;
|
||||||
}
|
}
|
||||||
|
|
||||||
<<<<<<< Updated upstream
|
|
||||||
public function server(? string $variableName = null, $default = null)
|
|
||||||
=======
|
|
||||||
public function request(? string $variableName = null)
|
public function request(? string $variableName = null)
|
||||||
{
|
{
|
||||||
return $this->post($variableName) ?? $this->get($variableName);
|
return $variableName === null ? array_merge(get(null), post(null)) : $this->post($variableName) ?? $this->get($variableName);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function server(? string $variableName = null)
|
public function server(? string $variableName = null)
|
||||||
>>>>>>> Stashed changes
|
|
||||||
{
|
{
|
||||||
return $variableName === null ? $this->request->getServerParams() : static::arrayGet($this->request->getServerParams(), $variableName) ?? $default;
|
return $variableName === null ? $this->request->getServerParams() : static::arrayGet($this->request->getServerParams(), $variableName) ?? $default;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue