|
7 | 7 | > non-idiomatic to PHP, this has been done to make integrating changes more |
8 | 8 | > efficient. |
9 | 9 |
|
10 | | -> Though all of the 0.4.0 tests pass, there may still be issues. Please |
11 | | -> visit the [PHP port's issues page](http://github.com/docopt/docopt.php) |
| 10 | +> As a result, unless a bug is present only in the PHP version, pull requests |
| 11 | +> are unlikely to be accepted unless they are themselves direct transliterations |
| 12 | +> of bugfixes in the Python version. |
| 13 | +
|
| 14 | +> Though all of the 0.4.2 tests pass, there may still be issues as this port is |
| 15 | +> relatively new. Please visit the |
| 16 | +> [PHP port's issues page](http://github.com/docopt/docopt.php) |
12 | 17 | > for a list of all current known issues and caveats. |
13 | 18 |
|
14 | 19 | > Furthermore, the PHP API **is a moving target**. Please see |
|
17 | 22 |
|
18 | 23 |
|
19 | 24 |
|
20 | | - |
21 | 25 | Isn't it awesome how `optparse` and `argparse` generate help messages |
22 | 26 | based on your code?! |
23 | 27 |
|
@@ -127,6 +131,9 @@ $doc = "Usage: my_program.php [-hso FILE] [--quiet | --verbose] [INPUT ...] |
127 | 131 | "; |
128 | 132 | ``` |
129 | 133 |
|
| 134 | +The optional second argument contains an array of additional data to influence |
| 135 | +docopt. The following keys are supported: |
| 136 | + |
130 | 137 | - `argv` is an optional argument vector; by default it is the argument vector |
131 | 138 | passed to your program (`array_slice($_SERVER['argv'], 1)`). You can supply |
132 | 139 | it with the list of strings, e.g. `array('--verbose', '-o', 'hai.txt')`. |
@@ -179,6 +186,7 @@ argument, `args['--speed']` is an option, and `args['move']` is a command. |
179 | 186 | Help message format |
180 | 187 | =============================================================================== |
181 | 188 |
|
| 189 | + |
182 | 190 | Help message consists of 2 parts: |
183 | 191 |
|
184 | 192 | - Usage pattern, e.g.:: |
|
0 commit comments