26 lines
593 B
PHP
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();
|
|
}
|
|
}
|