id; } /** * @param \Forum\DTO\Member $resource */ public function getAttributes($resource, ContextInterface $context): iterable { return [ 'username' => $resource->username, 'name' => $resource->name, 'role' => $resource->role, 'avatar_url' => $resource->avatar_url ]; } /** * @param \Forum\DTO\Member $resource */ public function getRelationships($resource, ContextInterface $context): iterable { return []; } }