This repository has been archived on 2025-05-09. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
Astral-nook/app/Transformers/Api/Client/EggTransformer.php

30 lines
562 B
PHP

<?php
namespace Pterodactyl\Transformers\Api\Client;
use Pterodactyl\Models\Egg;
class EggTransformer extends BaseClientTransformer
{
/**
* Return the resource name for the JSONAPI output.
*
* @return string
*/
public function getResourceName(): string
{
return Egg::RESOURCE_NAME;
}
/**
* @param \Pterodactyl\Models\Egg $egg
* @return array
*/
public function transform(Egg $egg)
{
return [
'uuid' => $egg->uuid,
'name' => $egg->name,
];
}
}