소스 검색

[DependencyInjection] added public attribute when dumping a container to XML

Fabien Potencier 14 년 전
부모
커밋
0b165e13b2
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      src/Symfony/Component/DependencyInjection/Dumper/XmlDumper.php

+ 3 - 0
src/Symfony/Component/DependencyInjection/Dumper/XmlDumper.php

@@ -122,6 +122,9 @@ class XmlDumper extends Dumper
         if (ContainerInterface::SCOPE_CONTAINER !== $scope = $definition->getScope()) {
             $service->setAttribute('scope', $scope);
         }
+        if (!$definition->isPublic()) {
+            $service->setAttribute('public', 'false');
+        }
 
         foreach ($definition->getTags() as $name => $tags) {
             foreach ($tags as $attributes) {