2018-01-20 03:47:06 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Pterodactyl\Transformers\Api\Application;
|
|
|
|
|
2020-12-04 17:56:44 +00:00
|
|
|
use Pterodactyl\Models\EggVariable;
|
2022-11-28 16:56:03 +00:00
|
|
|
use Pterodactyl\Models\ServerVariable;
|
2022-12-15 00:05:46 +00:00
|
|
|
use Pterodactyl\Transformers\Api\Transformer;
|
2018-01-20 03:47:06 +00:00
|
|
|
|
2022-12-15 00:05:46 +00:00
|
|
|
class ServerVariableTransformer extends Transformer
|
2018-01-20 03:47:06 +00:00
|
|
|
{
|
2018-01-26 03:26:06 +00:00
|
|
|
/**
|
|
|
|
* Return the resource name for the JSONAPI output.
|
|
|
|
*/
|
|
|
|
public function getResourceName(): string
|
|
|
|
{
|
|
|
|
return ServerVariable::RESOURCE_NAME;
|
|
|
|
}
|
|
|
|
|
2018-01-20 03:47:06 +00:00
|
|
|
/**
|
|
|
|
* Return a generic transformed server variable array.
|
|
|
|
*/
|
2022-12-15 00:05:46 +00:00
|
|
|
public function transform(EggVariable $model): array
|
2018-01-20 03:47:06 +00:00
|
|
|
{
|
2022-12-15 00:05:46 +00:00
|
|
|
return $model->toArray();
|
2018-01-20 03:47:06 +00:00
|
|
|
}
|
|
|
|
}
|