protected function getEntityFromConfig(array $config, $requestedName)
{
$entity = isset($config['entity_class']) ? $config['entity_class'] : stdClass::class;
if (!class_exists($entity)) {
throw new ServiceNotCreatedException(sprintf('Unable to create instance for service "%s"; entity class "%s" cannot be found', $requestedName, $entity));
}
return $entity;
}