2019-09-22 22:30:53 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Pterodactyl\Transformers\Api\Client;
|
|
|
|
|
|
|
|
use Pterodactyl\Models\Egg;
|
|
|
|
|
|
|
|
class EggTransformer extends BaseClientTransformer
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Return the resource name for the JSONAPI output.
|
|
|
|
*/
|
|
|
|
public function getResourceName(): string
|
|
|
|
{
|
|
|
|
return Egg::RESOURCE_NAME;
|
|
|
|
}
|
|
|
|
|
2022-10-14 16:59:20 +00:00
|
|
|
public function transform(Egg $egg): array
|
2019-09-22 22:30:53 +00:00
|
|
|
{
|
|
|
|
return [
|
|
|
|
'uuid' => $egg->uuid,
|
|
|
|
'name' => $egg->name,
|
|
|
|
];
|
|
|
|
}
|
|
|
|
}
|