Permalink
Browse files

YamlDumper should dump Definition::getFactoryClass() setting

  • Loading branch information...
1 parent 83e078a commit 77f00d263a9c4f83d1eda6f291cb69e690aa962e Alexey Prilipko committed Apr 8, 2013
@@ -102,6 +102,10 @@ private function addService($id, $definition)
$code .= sprintf(" synchronized: true\n");
}
+ if ($definition->getFactoryClass()) {
+ $code .= sprintf(" factory_class: %s\n", $definition->getFactoryClass());
+ }
+
if ($definition->getFactoryMethod()) {
$code .= sprintf(" factory_method: %s\n", $definition->getFactoryMethod());
}
@@ -9,6 +9,7 @@ services:
tags:
- { name: foo, foo: foo }
- { name: foo, bar: bar }
+ factory_class: FooClass
factory_method: getInstance
arguments: [foo, '@foo.baz', { '%foo%': 'foo is %foo%', foobar: '%foo%' }, true, '@service_container']
properties: { foo: bar, moo: '@foo.baz' }
@@ -23,6 +24,7 @@ services:
configurator: ['@foo.baz', configure]
foo.baz:
class: %baz_class%
+ factory_class: %baz_class%
factory_method: getInstance
configurator: ['%baz_class%', configureStatic1]
foo_bar:

0 comments on commit 77f00d2

Please sign in to comment.