peliprint/app/Services/Helpers/BlueprintExtensionLibrary.php
2023-03-26 18:18:54 +02:00

31 lines
No EOL
768 B
PHP

<?php
/*
| Welcome to the Blueprint Extension Library.
|
| This allows you and developers to interact with
| Blueprint easely and without hassle.
*/
namespace Pterodactyl\Services\Helpers;
use Pterodactyl\Contracts\Repository\SettingsRepositoryInterface;
use Illuminate\Http\RedirectResponse;
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;
}
}