You are here

private function PhpDumper::addServiceProperties in Service Container 7.2

Same name and namespace in other branches
  1. 7 modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php \Symfony\Component\DependencyInjection\Dumper\PhpDumper::addServiceProperties()
3 calls to PhpDumper::addServiceProperties()
PhpDumper::addService in modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php
Adds a service.
PhpDumper::addServiceInlinedDefinitions in modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php
Generates the inline definition of a service.
PhpDumper::addServiceInlinedDefinitionsSetup in modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php
Generates the inline definition setup.

File

modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/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;
}