library cliph
A library for testable command-line applications
99designs/cliph
A library for testable command-line applications
- Thursday, December 20, 2012
- by lox
- Repository
- 14 Watchers
- 2 Stars
- 41,814 Installations
- PHP
- 1 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 2 Versions
- 2 % Grown
Cliph - a library for testable CLI applications
<?php
$options = new \Cliph\Options($argv,array(
'--help,-h','--connect=NULL','--init=',':cmd'
));
// show help
if($options->has('-h','--help') || $options->errors())
{
$options->printErrors();
echo "\nusage: $argv[0] [..args] [cmd]\n\n";
echo " --connect <broker> : connect to broker, instead of localhost\n";
echo " --init <cmd> : command to run if cwd doesn't exist and needs initialization\n";
echo " --help -h : this documentation\n";
echo "\n";
exit(1);
}
echo $options->value('--connect');
Copyright
Copyright (c) 2012 99designs See LICENSE for details., (*1)