|
@@ -298,6 +298,19 @@ class Command
|
|
|
return $this->definition;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * Gets the InputDefinition to be used to create XML and Text representations of this Command.
|
|
|
+ *
|
|
|
+ * Can be overridden to provide the original command representation when it would otherwise
|
|
|
+ * be changed by merging with the application InputDefinition.
|
|
|
+ *
|
|
|
+ * @return InputDefinition An InputDefinition instance
|
|
|
+ */
|
|
|
+ protected function getNativeDefinition()
|
|
|
+ {
|
|
|
+ return $this->getDefinition();
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* Adds an argument.
|
|
|
*
|
|
@@ -531,7 +544,7 @@ class Command
|
|
|
$messages[] = '<comment>Aliases:</comment> <info>'.implode(', ', $this->getAliases()).'</info>';
|
|
|
}
|
|
|
|
|
|
- $messages[] = $this->definition->asText();
|
|
|
+ $messages[] = $this->getNativeDefinition()->asText();
|
|
|
|
|
|
if ($help = $this->getProcessedHelp()) {
|
|
|
$messages[] = '<comment>Help:</comment>';
|
|
@@ -572,7 +585,7 @@ class Command
|
|
|
$aliasXML->appendChild($dom->createTextNode($alias));
|
|
|
}
|
|
|
|
|
|
- $definition = $this->definition->asXml(true);
|
|
|
+ $definition = $this->getNativeDefinition()->asXml(true);
|
|
|
$commandXML->appendChild($dom->importNode($definition->getElementsByTagName('arguments')->item(0), true));
|
|
|
$commandXML->appendChild($dom->importNode($definition->getElementsByTagName('options')->item(0), true));
|
|
|
|