2019-09-22 22:30:53 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Pterodactyl\Transformers\Api\Client;
|
|
|
|
|
|
|
|
use Pterodactyl\Models\Egg;
|
2021-08-07 20:06:45 +00:00
|
|
|
use Pterodactyl\Transformers\Api\Transformer;
|
2019-09-22 22:30:53 +00:00
|
|
|
|
2021-08-07 20:06:45 +00:00
|
|
|
class EggTransformer extends Transformer
|
2019-09-22 22:30:53 +00:00
|
|
|
{
|
|
|
|
public function getResourceName(): string
|
|
|
|
{
|
|
|
|
return Egg::RESOURCE_NAME;
|
|
|
|
}
|
|
|
|
|
2021-08-07 20:06:45 +00:00
|
|
|
public function transform(Egg $egg): array
|
2019-09-22 22:30:53 +00:00
|
|
|
{
|
|
|
|
return [
|
|
|
|
'uuid' => $egg->uuid,
|
|
|
|
'name' => $egg->name,
|
|
|
|
];
|
|
|
|
}
|
|
|
|
}
|