2017 © Pedro Peláez
 

library cli-common

Common CLI helpers classes

image

ftven/cli-common

Common CLI helpers classes

  • Wednesday, January 14, 2015
  • by ohoareau
  • Repository
  • 17 Watchers
  • 1 Stars
  • 119 Installations
  • PHP
  • 1 Dependents
  • 1 Suggesters
  • 2 Forks
  • 1 Open issues
  • 6 Versions
  • 0 % Grown

The README.md

PHP CLI COMMON

Build Status, (*1)

Usage

Add the dependency in your composer.json :, (*2)

...
"require": {
    ...
    "ftven/cli-common": "1.*"
}

Then update your dependency :, (*3)

$ ./composer.phar update ftven/cli-common

Then you can use it directly in your scripts :, (*4)

<?php

// ...

require_once '/path/to/vendor/autoload.php';

$cli = new Ftven\Build\Cli\Application\CliApplication('mytool', '1.0.0');

$cli->addExtension(new MyNamespace\MyExtension());

$cli->run();

CliApplication is a full Symfony Console Application, so you can use all available methods on it to add commands, etc... As a best practices, we recommand not adding directly commands on the CliApplication, rather create an extension. For further information on creating extension, read CoreExtension class, or search for php-cli-xxx-extension on our GitHub., (*5)

Enjoy !, (*6)

FTVEN Build Team., (*7)

The Versions