mirror of
https://github.com/n3w/helpers-cli-input.git
synced 2025-12-19 20:53:27 +00:00
Updated example to reflect changes to manpage() function in pointybeard/helpers-functions-cli package
This commit is contained in:
parent
95e93ec1bc
commit
9ac0e21d04
1 changed files with 16 additions and 16 deletions
|
|
@ -5,8 +5,6 @@ include __DIR__.'/../vendor/autoload.php';
|
||||||
|
|
||||||
use pointybeard\Helpers\Cli\Input;
|
use pointybeard\Helpers\Cli\Input;
|
||||||
use pointybeard\Helpers\Cli\Colour\Colour;
|
use pointybeard\Helpers\Cli\Colour\Colour;
|
||||||
use pointybeard\Helpers\Functions\Flags;
|
|
||||||
use pointybeard\Helpers\Functions\Strings;
|
|
||||||
use pointybeard\Helpers\Functions\Cli;
|
use pointybeard\Helpers\Functions\Cli;
|
||||||
|
|
||||||
// Define what we are expecting to get from the command line
|
// Define what we are expecting to get from the command line
|
||||||
|
|
@ -54,26 +52,28 @@ $collection = (new Input\InputCollection())
|
||||||
$argv = Input\InputHandlerFactory::build('Argv', $collection);
|
$argv = Input\InputHandlerFactory::build('Argv', $collection);
|
||||||
|
|
||||||
// Display the manual in green text
|
// Display the manual in green text
|
||||||
echo Colour::colourise(Cli\manpage(
|
echo Cli\manpage(
|
||||||
basename(__FILE__),
|
basename(__FILE__),
|
||||||
'1.0.1',
|
'1.0.2',
|
||||||
'An example script for the PHP Helpers: Command-line Input and Input Type Handlers composer library (pointybeard/helpers-cli-input).',
|
'An example script for the PHP Helpers: Command-line Input and Input Type Handlers composer library (pointybeard/helpers-cli-input).',
|
||||||
'php -f example/example.php -- -vvv -d example/example.json import',
|
$collection,
|
||||||
$collection
|
Colour::FG_GREEN,
|
||||||
), Colour::FG_GREEN) . PHP_EOL . PHP_EOL;
|
Colour::FG_WHITE,
|
||||||
|
[
|
||||||
|
'Examples' => 'php -f example/example.php -- -vvv -d example/example.json import'
|
||||||
|
]
|
||||||
|
).PHP_EOL.PHP_EOL;
|
||||||
|
|
||||||
// example.php 1.0.0, An example script for the PHP Helpers: Command-line Input and Input Type Handlers
|
// example.php 1.0.2, An example script for the PHP Helpers: Command-line Input
|
||||||
// composer library (pointybeard/helpers-cli-input).
|
// and Input Type Handlers composer library (pointybeard/helpers-cli-input).
|
||||||
// Usage: example.php [OPTIONS]... ACTION...
|
// Usage: example.php [OPTIONS]... ACTION...
|
||||||
//
|
//
|
||||||
// Mandatory values for long options are mandatory for short options too.
|
|
||||||
//
|
|
||||||
// Arguments:
|
// Arguments:
|
||||||
// ACTION The name of the action to perform
|
// ACTION The name of the action to perform
|
||||||
//
|
//
|
||||||
// Options:
|
// Options:
|
||||||
// -v verbosity level. -v (errors only), -vv (warnings
|
// -v verbosity level. -v (errors only), -vv
|
||||||
// and errors), -vvv (everything).
|
// (warnings and errors), -vvv (everything).
|
||||||
// -d, --data=VALUE Path to the input JSON data
|
// -d, --data=VALUE Path to the input JSON data
|
||||||
//
|
//
|
||||||
// Examples:
|
// Examples:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue