1. Go to this page and download the library: Download magic-push/cli-toolkit 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/ */
magic-push / cli-toolkit example snippets
// Configure your script parameters
$request = Parametizer::newConfig()
->newArgument('chunk-size') // A positioned parameter.
->newFlag('--dry-run') // A named boolean parameter.
->run();
// Read parameters
$chunkSize = $request->getParamAsInt('chunk-size');
// Process...
if (!$request->getParamAsBool('dry-run')) {
// Make data changes.
}