misc_pterodactyl-panel/app/Transformers/Api/Client/EggTransformer.php

26 lines
502 B
PHP
Raw Normal View History

<?php
namespace Pterodactyl\Transformers\Api\Client;
use Pterodactyl\Models\Egg;
2022-12-15 00:05:46 +00:00
use Pterodactyl\Transformers\Api\Transformer;
2022-12-15 00:05:46 +00:00
class EggTransformer extends Transformer
{
/**
* Return the resource name for the JSONAPI output.
*/
public function getResourceName(): string
{
return Egg::RESOURCE_NAME;
}
2022-12-15 00:05:46 +00:00
public function transform(Egg $model): array
{
return [
2022-12-15 00:05:46 +00:00
'uuid' => $model->uuid,
'name' => $model->name,
];
}
}