Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. PhpDumper.php

function PhpDumper::addInlineVariables

1 call to PhpDumper::addInlineVariables()
PhpDumper::addInlineService in vendor/symfony/dependency-injection/Dumper/PhpDumper.php

File

vendor/symfony/dependency-injection/Dumper/PhpDumper.php, line 964

Class

PhpDumper
PhpDumper dumps a service container as a PHP class.

Namespace

Symfony\Component\DependencyInjection\Dumper

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;
}
RSS feed
Powered by Drupal