25 lines
601 B
PHP
25 lines
601 B
PHP
<?php
|
|
|
|
namespace App\Services;
|
|
|
|
/** Stable resource entrances and read-only history views; no category/data migration. */
|
|
final class ResourcePages
|
|
{
|
|
public const TYPES = ['freenode', 'shadowrocketids'];
|
|
|
|
public static function supports(?string $type): bool
|
|
{
|
|
return in_array($type, self::TYPES, true);
|
|
}
|
|
|
|
public static function entryPath(string $type): string
|
|
{
|
|
return $type === 'freenode' ? '/' : '/shadowrocketids';
|
|
}
|
|
|
|
public static function historyPath(?string $type = null): string
|
|
{
|
|
return '/history'.($type ? '/'.$type : '');
|
|
}
|
|
}
|