Dev SSO: Tables, SAML

This commit is contained in:
2024-12-30 09:44:47 +01:00
parent f7d11c297d
commit 50cc0fc5be
26 changed files with 710 additions and 112 deletions

View File

@@ -15,12 +15,8 @@ class Configuration {
$this->settings = Settings::loadDefaults();
$className = self::className;
$path = getClassPath($className, ".class");
if (file_exists($path) && is_readable($path)) {
include_once $path;
if (class_exists($className)) {
$this->database = new $className();
}
if (isClass($className)) {
$this->database = new $className();
}
}
@@ -32,7 +28,7 @@ class Configuration {
return $this->settings;
}
public static function create(string $className, $data) {
public static function create(string $className, $data): bool {
$path = getClassPath($className);
$classNameShort = explode("\\", $className);
$classNameShort = end($classNameShort);
@@ -86,7 +82,7 @@ class Configuration {
$code = "<?php";
}
return @file_put_contents($path, $code);
return @file_put_contents($path, $code) !== false;
}
public function delete(string $className): bool {