mirror of
https://github.com/pterodactyl/panel.git
synced 2026-11-30 11:25:52 -05:00
Co-authored-by: Anthony <anthony@infraly.co> Co-authored-by: Sky Mulley <daniel.mulley@outlook.com>
14 lines
284 B
PHP
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}_")));
|
|
}
|
|
}
|