2017 © Pedro Peláez
 

cakephp-plugin cakephp-shell-autohelp

Autogenerates CakePHP3 console shells help

image

zunderbolt/cakephp-shell-autohelp

Autogenerates CakePHP3 console shells help

  • Tuesday, March 28, 2017
  • by ZunderBolt
  • Repository
  • 1 Watchers
  • 0 Stars
  • 127 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 354 % Grown

The README.md

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., (*1)

Installation

composer require zunderbolt/cakephp-shell-autohelp

Usage

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, (*2)

Usage:
cake my [subcommand] [-h] [-q] [-v]

Subcommands:

test  Method description will be used in help

> bin/cake my test --help, (*3)

Usage:
cake my test [-h] [-q] [-v] <param1> [<param2>]

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)

The Versions

28/03 2017

dev-master

9999999-dev https://github.com/zunderbolt/cakephp-shell-autohelp

Autogenerates CakePHP3 console shells help

  Sources   Download

MIT

The Requires

 

The Development Requires

plugin cakephp shell