99designs / cliph
适用于可测试命令行应用程序的库
v0.1.0
2012-12-20 20:04 UTC
Requires
- php: >=5.3.0
Requires (Dev)
- phpunit/phpunit: >=3.7.0
This package is not auto-updated.
Last update: 2024-09-14 14:50:17 UTC
README
<?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');
版权
版权所有 (c) 2012 99designs。详细信息请参阅LICENSE。