| 1 | <?php |
||
| 4 | class CLI |
||
| 5 | { |
||
| 6 | /** |
||
| 7 | * Executes a WP CLI command. |
||
| 8 | * |
||
| 9 | * @param string $command The command to execute. |
||
| 10 | * @param array $arguments Optional, command arguments. Default none. |
||
| 11 | * @param array $options Optional, command options. Default none. |
||
| 12 | * |
||
| 13 | * @return string The output from the executed command or NULL if an error occurred or the command produces no output. |
||
| 14 | */ |
||
| 15 | public static function execCommand($command, $arguments = [], $options = []) |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Execution options. |
||
| 27 | * |
||
| 28 | * @param array $options Command options. |
||
| 29 | * |
||
| 30 | * @return string The execution command options. |
||
| 31 | */ |
||
| 32 | protected static function execOptions($options) |
||
| 44 | } |
||
| 45 |