2 declare(strict_types = 1);
34 if (empty($mappers)) {
39 foreach ($mappers as $variableName => $mapper) {
40 $value = $mapper->resolve(
41 (
string)($attributes[$variableName] ??
'')
43 if ($value ===
null) {
46 $values[$variableName] = $value;
49 $attributes = array_merge($attributes, $values);
61 if (empty($mappers)) {
66 foreach ($mappers as $variableName => $mapper) {
67 $value = $mapper->generate(
68 (
string)($attributes[$variableName] ??
'')
70 if ($value ===
null) {
73 $values[$variableName] = $value;
76 $attributes = array_merge($attributes, $values);
86 protected function fetchMappers(
Route $route, array $attributes,
string $type = MappableAspectInterface::class): array
88 if (empty($attributes)) {