<?php
declare(strict_types=1);
namespace App\Schema;
use App\Entity\Aircraft;
use Neomerx\JsonApi\Schema\BaseSchema;
final class AircraftSchema extends BaseSchema implements SchemaInterface
{
/**
* @var string
*/
protected $resourceType = 'aircrafts';
public static function getEntity(): string
{
return Aircraft::class;
}
/**
* @param Aircraft $resource
*/
public function getAttributes($resource, array $fieldKeysFilter = null): ?array
{
return [];
}
/**
* @param Aircraft $resource
*/
public function getId($resource): ?string
{
return $resource->id;
}
}