2023-04-05 15:29:58 -04:00
|
|
|
<?php
|
|
|
|
|
2024-10-15 07:50:35 -04:00
|
|
|
/**
|
|
|
|
* BlueprintExtensionLibrary (Backwards compatibility)
|
|
|
|
*
|
|
|
|
* BlueprintLegacyLibrary provides backwards-compatibility for older
|
|
|
|
* extensions. Functions are deprecated, unmaintained and slowly phased out.
|
|
|
|
* Consider using maintained versions of BlueprintExtensionLibrary.
|
|
|
|
*
|
|
|
|
* Certain functions are being phased out and return "false" instead of the
|
|
|
|
* correct value. Consider switching to maintained versions to prevent your
|
|
|
|
* extension from breaking with future updates.
|
|
|
|
*
|
|
|
|
* @category BlueprintExtensionLibrary
|
|
|
|
* @package BlueprintLegacyLibrary
|
|
|
|
* @author Emma <hello@prpl.wtf>
|
|
|
|
* @copyright 2023-2024 Emma (prpl.wtf)
|
|
|
|
* @license https://blueprint.zip/docs/?page=about/License MIT License
|
|
|
|
* @link https://blueprint.zip/docs/?page=documentation/$blueprint
|
|
|
|
* @since indev
|
|
|
|
* @deprecated alpha
|
|
|
|
*/
|
2023-09-07 10:17:04 -04:00
|
|
|
|
2023-04-05 15:29:58 -04:00
|
|
|
namespace Pterodactyl\Services\Helpers;
|
|
|
|
|
2023-04-14 11:18:24 -04:00
|
|
|
use Pterodactyl\Contracts\Repository\SettingsRepositoryInterface;
|
2023-09-07 10:17:04 -04:00
|
|
|
use Pterodactyl\BlueprintFramework\Services\PlaceholderService\BlueprintPlaceholderService;
|
2023-04-14 11:18:24 -04:00
|
|
|
|
2023-04-05 15:29:58 -04:00
|
|
|
class BlueprintExtensionLibrary
|
|
|
|
{
|
2023-06-28 09:16:29 -04:00
|
|
|
public function __construct(
|
|
|
|
private SettingsRepositoryInterface $settings,
|
|
|
|
private BlueprintPlaceholderService $placeholder,
|
|
|
|
) {
|
|
|
|
}
|
|
|
|
|
|
|
|
public function dbGet($table, $record) {
|
|
|
|
return $this->settings->get($table."::".$record);
|
|
|
|
}
|
|
|
|
public function dbSet($table, $record, $value) {
|
|
|
|
return $this->settings->set($table."::".$record, $value);
|
|
|
|
}
|
|
|
|
|
2024-10-15 07:50:35 -04:00
|
|
|
public function notify($text) { return false; }
|
|
|
|
public function notifyAfter($delay, $text) { return false; }
|
|
|
|
public function notifyNow($text) { return false; }
|
2023-06-28 09:16:29 -04:00
|
|
|
|
2024-10-15 07:50:35 -04:00
|
|
|
public function fileRead($path) { return false; }
|
|
|
|
public function fileMake($path) { return false; }
|
|
|
|
public function fileWipe($path) { return false; }
|
2023-06-16 12:10:26 -04:00
|
|
|
}
|