Files
pterodactyl-panel/app/Http/Controllers/Api/Client/ClientApiController.php
T

30 lines
832 B
PHP
Raw Normal View History

<?php
2026-10-05 18:10:18 -04:00
declare(strict_types=1);
namespace Pterodactyl\Http\Controllers\Api\Client;
2026-10-05 18:10:18 -04:00
use Pterodactyl\Http\Concerns\ResolvesRequestContext;
use Pterodactyl\Http\Controllers\Api\Application\ApplicationApiController;
2026-10-05 18:10:18 -04:00
use Pterodactyl\Transformers\Api\Client\BaseClientTransformer;
abstract class ClientApiController extends ApplicationApiController
{
2026-10-05 18:10:18 -04:00
use ResolvesRequestContext;
/**
2026-10-05 18:10:18 -04:00
* Return an instance of an application transformer.
*
* @template T of \Pterodactyl\Transformers\Api\Client\BaseClientTransformer
*
* @param class-string<T> $abstract
* @return T
*
* @noinspection PhpDocSignatureInspection
*/
2026-10-05 18:10:18 -04:00
public function getTransformer(string $abstract): BaseClientTransformer
{
2026-10-05 18:10:18 -04:00
return $this->makeTransformer($abstract, BaseClientTransformer::class);
}
}