v2.0-alpha

This commit is contained in:
2022-06-20 19:52:31 +02:00
parent b549af3166
commit ce647d4423
78 changed files with 2474 additions and 2083 deletions

View File

@@ -5,8 +5,9 @@ namespace Elements;
use Configuration\Settings;
use Driver\Logger\Logger;
use Driver\SQL\SQL;
use Objects\Context;
use Objects\Router\Router;
use Objects\User;
use Objects\DatabaseEntity\User;
abstract class Document {
@@ -32,16 +33,20 @@ abstract class Document {
return $this->logger;
}
public function getUser(): User {
return $this->router->getUser();
public function getUser(): ?User {
return $this->getContext()->getUser();
}
public function getContext(): Context {
return $this->router->getContext();
}
public function getSQL(): ?SQL {
return $this->getUser()->getSQL();
return $this->getContext()->getSQL();
}
public function getSettings(): Settings {
return $this->getUser()->getConfiguration()->getSettings();
return $this->getContext()->getSettings();
}
public function getCSPNonce(): ?string {