/**
* @throws ApiDefinitionGeneratorNotFoundException
*/
private function getGenerator(string
$format, string
$type): ApiDefinitionGeneratorInterface
{ foreach ($this->generators
as $generator) { if ($generator->
supports($format,
$type)) { return $generator;
} } throw new ApiDefinitionGeneratorNotFoundException($format);
} /**
* @throws ApiDefinitionGeneratorNotFoundException
*
* @return array<string, EntityDefinition>|array<string, EntityDefinition&SalesChannelDefinitionInterface>
*/
private function getDefinitions(string
$type): array
{ if ($type === self::API
) { return $this->definitionRegistry->
getDefinitions();
}