Files
pterodactyl-panel/app/Transformers/Api/Application/EggVariableTransformer.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

32 lines
657 B
PHP

<?php
declare(strict_types=1);
namespace Pterodactyl\Transformers\Api\Application;
use Pterodactyl\Models\Egg;
use Pterodactyl\Models\EggVariable;
use Pterodactyl\Support\JsonValueGuard;
class EggVariableTransformer extends BaseTransformer
{
/**
* Return the resource name for the JSONAPI output.
*/
public function getResourceName(): string
{
return Egg::RESOURCE_NAME;
}
/**
* @return ApiPayload
*/
public function transform(EggVariable $model): array
{
$attributes = $model->attributesToArray();
JsonValueGuard::assertPayload($attributes);
return $attributes;
}
}