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

27 lines
593 B
PHP
Raw Permalink Normal View History

<?php
namespace Pterodactyl\Transformers\Api\Application;
use Pterodactyl\Models\EggVariable;
use Pterodactyl\Models\ServerVariable;
2022-12-15 00:05:46 +00:00
use Pterodactyl\Transformers\Api\Transformer;
2022-12-15 00:05:46 +00:00
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.
*/
2022-12-15 00:05:46 +00:00
public function transform(EggVariable $model): array
{
2022-12-15 00:05:46 +00:00
return $model->toArray();
}
}