private MapEntity
$defaults =
new MapEntity(),
) { } public function resolve(Request
$request, ArgumentMetadata
$argument): array
{ if (\
is_object($request->attributes->
get($argument->
getName()))) { return [];
} $options =
$argument->
getAttributes(MapEntity::
class, ArgumentMetadata::IS_INSTANCEOF
);
$options =
($options[0
] ??
$this->defaults
)->
withDefaults($this->defaults,
$argument->
getType());
if (!
$options->class ||
$options->disabled
) { return [];
} if (!
$manager =
$this->
getManager($options->objectManager,
$options->class
)) { return [];
} $message = '';
if (null !==
$options->expr
) { if (null ===
$object =
$this->
findViaExpression($manager,
$request,
$options)) {