8f744c79a80dac3739494c08d4fa76c90a750813
[yaffs-website] / vendor / drush / drush / src / Preflight / PreflightArgsInterface.php
1 <?php
2 namespace Drush\Preflight;
3
4 use Consolidation\Config\ConfigInterface;
5
6 /**
7  * Storage for arguments preprocessed during preflight.
8  */
9 interface PreflightArgsInterface
10 {
11     /**
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.
16      */
17     public function optionsWithValues();
18
19     /**
20      * Copy any applicable arguments into the provided configuration
21      * object, as appropriate.
22      *
23      * @param ConfigInterface $config The configuration object to inject data into
24      */
25     public function applyToConfig(ConfigInterface $config);
26
27     /**
28      * Return all of the args from the inputs that were NOT processed
29      * by the ArgsPreprocessor (anything not listed in optionsWithValues).
30      */
31     public function args();
32
33     /**
34      * Return the path to this application's executable ($argv[0]).
35      */
36     public function applicationPath();
37
38     /**
39      * Add one argument to the end of the list returned by the `args()` method.
40      *
41      * @param string $arg One argument
42      */
43     public function addArg($arg);
44
45     /**
46      * Add everything in the provided array to the list returned by `args()`
47      *
48      * @param $args
49      */
50     public function passArgs($args);
51
52     /**
53      * Return any '@alias' that may have appeared before the argument
54      * holding the command name.
55      */
56     public function alias();
57
58     /**
59      * Returns 'true' if an '@alias' was set.
60      */
61     public function hasAlias();
62
63     /**
64      * Set an alias. Should always begin with '@'.
65      *
66      * @param string $alias The alias name '@site'
67      */
68     public function setAlias($alias);
69 }