2019-09-22 22:30:53 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Pterodactyl\Transformers\Api\Client;
|
|
|
|
|
|
|
|
use Pterodactyl\Models\Egg;
|
2022-12-15 00:05:46 +00:00
|
|
|
use Pterodactyl\Transformers\Api\Transformer;
|
2019-09-22 22:30:53 +00:00
|
|
|
|
2022-12-15 00:05:46 +00:00
|
|
|
class EggTransformer extends Transformer
|
2019-09-22 22:30:53 +00:00
|
|
|
{
|
|
|
|
/**
|
|
|
|
* 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
|
2019-09-22 22:30:53 +00:00
|
|
|
{
|
|
|
|
return [
|
2022-12-15 00:05:46 +00:00
|
|
|
'uuid' => $model->uuid,
|
|
|
|
'name' => $model->name,
|
2019-09-22 22:30:53 +00:00
|
|
|
];
|
|
|
|
}
|
|
|
|
}
|