misc_pterodactyl-panel/app/Transformers/Api/Application/ServerVariableTransformer.php
2022-12-14 18:04:16 -07:00

26 lines
593 B
PHP

<?php
namespace Pterodactyl\Transformers\Api\Application;
use Pterodactyl\Models\EggVariable;
use Pterodactyl\Models\ServerVariable;
use Pterodactyl\Transformers\Api\Transformer;
class ServerVariableTransformer extends Transformer
{
/**
* Return the resource name for the JSONAPI output.
*/
public function getResourceName(): string
{
return ServerVariable::RESOURCE_NAME;
}
/**
* Return a generic transformed server variable array.
*/
public function transform(EggVariable $model): array
{
return $model->toArray();
}
}