misc_pterodactyl-panel/app/Transformers/Api/Application/EggVariableTransformer.php

27 lines
586 B
PHP
Raw Normal View History

<?php
namespace Pterodactyl\Transformers\Api\Application;
use Pterodactyl\Models\Egg;
use Pterodactyl\Models\EggVariable;
2022-12-15 00:05:46 +00:00
use Pterodactyl\Transformers\Api\Transformer;
2022-12-15 00:05:46 +00:00
class EggVariableTransformer 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
/**
* Transform egg variable into a representation for the application API.
*/
public function transform(EggVariable $model): array
{
return $model->toArray();
}
}