if (\
is_array($tag =
$value)) { $element->
setAttribute('type', 'collection'
);
$this->
convertParameters($value,
$type,
$element, 'key'
);
} elseif ($value instanceof TaggedIteratorArgument
|| ($value instanceof ServiceLocatorArgument &&
$tag =
$value->
getTaggedIteratorArgument())) { $element->
setAttribute('type',
$value instanceof TaggedIteratorArgument ? 'tagged_iterator' : 'tagged_locator'
);
$element->
setAttribute('tag',
$tag->
getTag());
if (null !==
$tag->
getIndexAttribute()) { $element->
setAttribute('index-by',
$tag->
getIndexAttribute());
if (null !==
$tag->
getDefaultIndexMethod()) { $element->
setAttribute('default-index-method',
$tag->
getDefaultIndexMethod());
} if (null !==
$tag->
getDefaultPriorityMethod()) { $element->
setAttribute('default-priority-method',
$tag->
getDefaultPriorityMethod());
} } if ($excludes =
$tag->
getExclude()) { if (1 === \
count($excludes)) { $element->
setAttribute('exclude',
$excludes[0
]);
} else { foreach ($excludes as $exclude) {