PHP code example of enygma / cmd

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

    

enygma / cmd example snippets




d\Command;

$cmd = new Command();
$args = $cmd->execute($_SERVER['argv']);

echo 'RESULT: '.var_export($args, true)."\n";



d\Output;

$out = new Output();
$out->success('Success message goes here!');


md\Output;

$out = new Output();
$out->addType('custom1', 'white', 'blue');

$out->custom1('A custom message');



d\Command;

$cmd = new Command();
$config = [
  'default' => ['foo' => true],
  ', true)."\n";