comparison vendor/symfony/console/Descriptor/XmlDescriptor.php @ 16:c2387f117808

Routine composer update
author Chris Cannam
date Tue, 10 Jul 2018 15:07:59 +0100
parents 1fec387a4317
children 129ea1e6d783
comparison
equal deleted inserted replaced
15:e200cb7efeb3 16:c2387f117808
222 $dom->appendChild($objectXML = $dom->createElement('option')); 222 $dom->appendChild($objectXML = $dom->createElement('option'));
223 $objectXML->setAttribute('name', '--'.$option->getName()); 223 $objectXML->setAttribute('name', '--'.$option->getName());
224 $pos = strpos($option->getShortcut(), '|'); 224 $pos = strpos($option->getShortcut(), '|');
225 if (false !== $pos) { 225 if (false !== $pos) {
226 $objectXML->setAttribute('shortcut', '-'.substr($option->getShortcut(), 0, $pos)); 226 $objectXML->setAttribute('shortcut', '-'.substr($option->getShortcut(), 0, $pos));
227 $objectXML->setAttribute('shortcuts', '-'.implode('|-', explode('|', $option->getShortcut()))); 227 $objectXML->setAttribute('shortcuts', '-'.str_replace('|', '|-', $option->getShortcut()));
228 } else { 228 } else {
229 $objectXML->setAttribute('shortcut', $option->getShortcut() ? '-'.$option->getShortcut() : ''); 229 $objectXML->setAttribute('shortcut', $option->getShortcut() ? '-'.$option->getShortcut() : '');
230 } 230 }
231 $objectXML->setAttribute('accept_value', $option->acceptValue() ? 1 : 0); 231 $objectXML->setAttribute('accept_value', $option->acceptValue() ? 1 : 0);
232 $objectXML->setAttribute('is_value_required', $option->isValueRequired() ? 1 : 0); 232 $objectXML->setAttribute('is_value_required', $option->isValueRequired() ? 1 : 0);