Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zunderbolt/cakephp-shell-autohelp
Autogenerates CakePHP3 console shell help
https://github.com/zunderbolt/cakephp-shell-autohelp
cakephp cakephp3 shell
Last synced: about 1 month ago
JSON representation
Autogenerates CakePHP3 console shell help
- Host: GitHub
- URL: https://github.com/zunderbolt/cakephp-shell-autohelp
- Owner: zunderbolt
- Created: 2017-03-28T10:53:48.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-03-28T11:43:41.000Z (over 7 years ago)
- Last Synced: 2024-04-19T17:08:07.363Z (8 months ago)
- Topics: cakephp, cakephp3, shell
- Language: PHP
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Shell-auto-help plugin for CakePHP
Small trait to autogenerate CakePHP3 console shells help. No need to write ```$parser->addArgument()``` and stuff,
just add phpdoc to your shell methods.#### Installation
```
composer require zunderbolt/cakephp-shell-autohelp
```#### Usage
```php
namespace App\Shell;use Cake\Console\Shell;
use ZunderBolt\ShellAutoHelp\AutoHelpTrait;class MyShell extends Shell
{
use AutoHelpTrait;/**
* Method description will be used in help
* @param string $param1 Param1 description
* @param mixed $param2 Param2 description
*/
public function test($param1, $param2 = null)
{
}
}
````> bin/cake my`
```
Usage:
cake my [subcommand] [-h] [-q] [-v]Subcommands:
test Method description will be used in help
````> bin/cake my test --help`
```
Usage:
cake my test [-h] [-q] [-v] []Options:
--help, -h Display this help.
--quiet, -q Enable quiet output.
--verbose, -v Enable verbose output.Arguments:
param1 (string) Param1 description
param2 (mixed) Param2 description (optional)
```