|
|
@@ -38,12 +38,12 @@ final class EnumProvider implements ProviderInterface
|
|
|
throw new RuntimeException('not supported', 500);
|
|
|
}
|
|
|
|
|
|
- $id = $uriVariables['id'];
|
|
|
+ $name = $uriVariables['name'];
|
|
|
$enums = $this->parser->yamlParser($this->opentalentConfig, 'enum.yaml');
|
|
|
- $enumClass = $enums['opentalent'][$id];
|
|
|
+ $enumClass = $enums['opentalent'][$name];
|
|
|
|
|
|
if(!$enumClass) {
|
|
|
- throw new NotFoundHttpException(sprintf('Enum %s does\'nt exist', $id));
|
|
|
+ throw new NotFoundHttpException(sprintf('Enum %s does\'nt exist', $name));
|
|
|
}
|
|
|
|
|
|
try{
|
|
|
@@ -52,12 +52,12 @@ final class EnumProvider implements ProviderInterface
|
|
|
'toArray'
|
|
|
);
|
|
|
}catch (Exception){
|
|
|
- throw new NotFoundHttpException(sprintf('Enum %s does\'nt exist', $id));
|
|
|
+ throw new NotFoundHttpException(sprintf('Enum %s does\'nt exist', $name));
|
|
|
}
|
|
|
|
|
|
$enumResponse = new Enum();
|
|
|
- $enumResponse->setName($id);
|
|
|
+ $enumResponse->setName($name);
|
|
|
$enumResponse->setItems($items);
|
|
|
return $enumResponse;
|
|
|
}
|
|
|
-}
|
|
|
+}
|