Files
pterodactyl-panel/app/Support/DatabaseName.php
T
6c0413e39b Start 2.0 development
Co-authored-by: Anthony <anthony@infraly.co>
Co-authored-by: Sky Mulley <daniel.mulley@outlook.com>
2026-10-05 18:10:18 -04:00

14 lines
284 B
PHP

<?php
declare(strict_types=1);
namespace Pterodactyl\Support;
final class DatabaseName
{
public static function generateUnique(string $name, int $serverId): string
{
return sprintf('s%d_%s', $serverId, mb_substr($name, 0, 48 - mb_strlen("s{$serverId}_")));
}
}