2023-04-05 15:29:58 -04:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/*
|
|
|
|
| Welcome to the Blueprint Extension Library.
|
|
|
|
|
|
2023-04-11 14:48:17 -04:00
|
|
|
| This allows developers to interact with
|
|
|
|
| Pterodactyl easely and without hassle.
|
2023-04-05 15:29:58 -04:00
|
|
|
*/
|
|
|
|
|
|
|
|
namespace Pterodactyl\Services\Helpers;
|
|
|
|
|
|
|
|
class BlueprintExtensionLibrary
|
|
|
|
{
|
|
|
|
// Construct BlueprintExtensionLibrary
|
|
|
|
public function __construct(
|
|
|
|
private SettingsRepositoryInterface $settings,
|
|
|
|
) {
|
|
|
|
}
|
|
|
|
|
|
|
|
public function db($type, $table, $key, $value) {
|
|
|
|
if ($type === "get") {
|
|
|
|
return $this->settings->get($table."::".$key);
|
|
|
|
};
|
|
|
|
if ($type === "set") {
|
|
|
|
return $this->settings->set($table."::".$key, $value);
|
|
|
|
};
|
|
|
|
return true;
|
|
|
|
}
|
2023-03-26 12:18:54 -04:00
|
|
|
}
|