/** * Get the default option flags for all commands * * @return array<Ulrichsg\Getopt\Option> */ public static function getDefaultOptions() { return [Option::withCount('h', 'help')->setDescription('Print help and exit'), Option::withCount('q', 'quiet')->setDescription('Suppress all output'), Option::withCount('v', 'verbose')->setDescription('Increase verbosity with -v, -vv, or -vvv'), Option::withCount('V', 'version')->setDescription('Print command version and exit')]; }
/** * Desired CLI options. Plow uses the Getopt library, so this function must * return an array of Getopt Options. * * The following options will automatically be added, and must not be * included: * -h/--help * -v/--verbose * -q/--quiet * -V/--version * * The \Firehed\Plow\Option class provides factory methods around the Getopt * library for convenience. * * @see http://ulrichsg.github.io/getopt-php/advanced/option-descriptions.html * @return array<\Ulrichsg\Getopt\Option> */ public function getOptions() { return [Option::withRequiredValue('o', 'output-file')->setDescription('Write output to designated file'), Option::withCount(null, 'stdout')->setDescription('Output converted text to STDOUT')]; }