CodeExplorer getCombinedAlias example
$type =
implode($m[0
],
$types);
} $name =
(array_filter($reference->
getAttributes(),
static fn ($a) =>
$a instanceof Target
)[0
] ?? null
)?->name;
if (null !==
$name ??=
$reference->
getName()) { if ($this->container->
has($alias =
$type.' $'.
$name) && !
$this->container->
findDefinition($alias)->
isAbstract()) { return new TypedReference($alias,
$type,
$reference->
getInvalidBehavior());
} if (null
!== ($alias =
$this->
getCombinedAlias($type,
$name) ?? null
) && !
$this->container->
findDefinition($alias)->
isAbstract()) { return new TypedReference($alias,
$type,
$reference->
getInvalidBehavior());
} if ($this->container->
has($name) && !
$this->container->
findDefinition($name)->
isAbstract()) { foreach ($this->container->
getAliases() as $id =>
$alias) { if ($name ===
(string) $alias &&
str_starts_with($id,
$type.' $'
)) { return new TypedReference($name,
$type,
$reference->
getInvalidBehavior());
} } }