CodeExplorer addInlineReference example
return [$file,
$code];
} private function addInlineVariables(string
$id, Definition
$definition, array
$arguments, bool
$forConstructor): string
{ $code = '';
foreach ($arguments as $argument) { if (\
is_array($argument)) { $code .=
$this->
addInlineVariables($id,
$definition,
$argument,
$forConstructor);
} elseif ($argument instanceof Reference
) { $code .=
$this->
addInlineReference($id,
$definition,
$argument,
$forConstructor);
} elseif ($argument instanceof Definition
) { $code .=
$this->
addInlineService($id,
$definition,
$argument,
$forConstructor);
} } return $code;
} private function addInlineReference(string
$id, Definition
$definition, string
$targetId, bool
$forConstructor): string
{ while ($this->container->
hasAlias($targetId)) { return [$file,
$code];
} private function addInlineVariables(string
$id, Definition
$definition, array
$arguments, bool
$forConstructor): string
{ $code = '';
foreach ($arguments as $argument) { if (\
is_array($argument)) { $code .=
$this->
addInlineVariables($id,
$definition,
$argument,
$forConstructor);
} elseif ($argument instanceof Reference
) { $code .=
$this->
addInlineReference($id,
$definition,
$argument,
$forConstructor);
} elseif ($argument instanceof Definition
) { $code .=
$this->
addInlineService($id,
$definition,
$argument,
$forConstructor);
} } return $code;
} private function addInlineReference(string
$id, Definition
$definition, string
$targetId, bool
$forConstructor): string
{ while ($this->container->
hasAlias($targetId)) { return [$file,
$code];
} private function addInlineVariables(string
$id, Definition
$definition, array
$arguments, bool
$forConstructor): string
{ $code = '';
foreach ($arguments as $argument) { if (\
is_array($argument)) { $code .=
$this->
addInlineVariables($id,
$definition,
$argument,
$forConstructor);
} elseif ($argument instanceof Reference
) { $code .=
$this->
addInlineReference($id,
$definition,
$argument,
$forConstructor);
} elseif ($argument instanceof Definition
) { $code .=
$this->
addInlineService($id,
$definition,
$argument,
$forConstructor);
} } return $code;
} private function addInlineReference(string
$id, Definition
$definition, string
$targetId, bool
$forConstructor): string
{ while ($this->container->
hasAlias($targetId)) {