You are here

private function PhpDumper::addServiceProperties in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/dependency-injection/Dumper/PhpDumper.php \Symfony\Component\DependencyInjection\Dumper\PhpDumper::addServiceProperties()
3 calls to PhpDumper::addServiceProperties()
PhpDumper::addService in vendor/symfony/dependency-injection/Dumper/PhpDumper.php
Adds a service.
PhpDumper::addServiceInlinedDefinitions in vendor/symfony/dependency-injection/Dumper/PhpDumper.php
Generates the inline definition of a service.
PhpDumper::addServiceInlinedDefinitionsSetup in vendor/symfony/dependency-injection/Dumper/PhpDumper.php
Generates the inline definition setup.

File

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

Class

PhpDumper
PhpDumper dumps a service container as a PHP class.

Namespace

Symfony\Component\DependencyInjection\Dumper

Code

private function addServiceProperties($id, $definition, $variableName = 'instance') {
  $code = '';
  foreach ($definition
    ->getProperties() as $name => $value) {
    $code .= sprintf("        \$%s->%s = %s;\n", $variableName, $name, $this
      ->dumpValue($value));
  }
  return $code;
}