do not use app container in classes
soko-web/pipeline/pr-master This commit looks good

This commit is contained in:
bence committed 2023-04-19 23:26:24 +02:00
1 parent 0f87a9c6e3
commit 4fe463fcc5
9 files changed
+68 -31

No files matched your search

+2 -8
View File
@@ -14,15 +14,9 @@ class Redirect implements IRedirect
$this->type = $type;
}
public function getUrl(): string
public function getTarget(): string
{
if (preg_match('/^http(s)?/', $this->target) === 1) {
$link = $this->target;
} else {
$link = \Container::$request->getBase() . $this->target;
}
return $link;
return $this->target;
}
public function getHttpCode(): int