2 namespace Drush\Preflight;
4 use Consolidation\Config\ConfigInterface;
7 * Storage for arguments preprocessed during preflight.
9 interface PreflightArgsInterface
12 * Return an associative array of '--option' => 'methodName'.
13 * The 'option' string should begin with the appropriate number
14 * of dashes (one or two, as desired), and should end with a '='
15 * if the option requires a value.
17 public function optionsWithValues();
20 * Copy any applicable arguments into the provided configuration
21 * object, as appropriate.
23 * @param ConfigInterface $config The configuration object to inject data into
25 public function applyToConfig(ConfigInterface $config);
28 * Return all of the args from the inputs that were NOT processed
29 * by the ArgsPreprocessor (anything not listed in optionsWithValues).
31 public function args();
34 * Return the path to this application's executable ($argv[0]).
36 public function applicationPath();
39 * Add one argument to the end of the list returned by the `args()` method.
41 * @param string $arg One argument
43 public function addArg($arg);
46 * Add everything in the provided array to the list returned by `args()`
50 public function passArgs($args);
53 * Return any '@alias' that may have appeared before the argument
54 * holding the command name.
56 public function alias();
59 * Returns 'true' if an '@alias' was set.
61 public function hasAlias();
64 * Set an alias. Should always begin with '@'.
66 * @param string $alias The alias name '@site'
68 public function setAlias($alias);