PHP code example of maxkaemmerer / console

1. Go to this page and download the library: Download maxkaemmerer/console 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/ */

    

maxkaemmerer / console example snippets


 declare(strict_types=1);

use MaxKaemmerer\Console\Argument\Argument;

of the Argument')->parse($argv);
var_dump($myValue);

 declare(strict_types=1);

use MaxKaemmerer\Console\Argument\Argument;
use MaxKaemmerer\Console\Argument\FlagArgument;
use MaxKaemmerer\Console\Argument\InputArguments;

', 5, 'The aggregateVersion to be deleted from snapshots'),
    Argument::create('since', 'now', 'The point in time since when created aggregates are 
shell script
php oneArgument.php --anArgumentName=anArgumentValue
string(15) "anArgumentValue"
shell script
php multipleArguments.php --aggregateIds="someId,someOtherId" --flagName --aggregateVersion="7"
array(4) {
  'aggregateIds' =>
  array(2) {
    [0] =>
    string(6) "someId"
    [1] =>
    string(11) "someOtherId"
  }
  'aggregateVersion' =>
  int(7)
  'since' =>
  string(3) "now"
  'rebuild' =>
  bool(true)
}