+ if ($value instanceof ServiceClosureArgument) {
+ $value = $value->getValues()[0];
+ }
+ if ($value instanceof ArgumentInterface) {
+ if ($value instanceof TaggedIteratorArgument) {
+ return new TaggedValue('tagged', $value->getTag());
+ }
+ if ($value instanceof IteratorArgument) {
+ $tag = 'iterator';
+ } else {
+ throw new RuntimeException(sprintf('Unspecified Yaml tag for type "%s".', get_class($value)));
+ }
+
+ return new TaggedValue($tag, $this->dumpValue($value->getValues()));
+ }
+