PHP code example of simonepm / argumentor
1. Go to this page and download the library: Download simonepm/argumentor library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
simonepm / argumentor example snippets
imonepm\Argumentor\Command;
use Simonepm\Argumentor\Argument;
use Simonepm\Argumentor\Option;
$command = new Command();
$command->RegisterArgument("argument");
$command->RegisterOption("option", "o");
$command->Exec(function(Argument $argument, Option $option) {
echo $argument->Get("argument") . PHP_EOL; // "testArgument\n"
echo $option->Get("option") . PHP_EOL; // "testOption\n"
});