public function outputHelp($short = false)
    {
        echo "Usage: " . $this->getName() . " ";
        if (!empty($this->params)) {
            foreach ($this->params as $param) {
                if ($param['required'] == true) {
                    echo '<' . $param['name'] . '> ';
                } else {
                    echo '[' . $param['name'] . '] ';
                }
            }
        }
        echo "[options]";

        if (!$short) {
            echo PHP_EOL . PHP_EOL;

            if (!empty($this->params)) {
                echo "Parameters:" . PHP_EOL;
                foreach ($this->params as $param) {
                    echo "\t" . $param['help'] . PHP_EOL;
                }
                echo PHP_EOL;
            }

            echo "Options:" . PHP_EOL;
            foreach ($this->options as $option) {
                $output = "\t" . $option['help'];
                if (array_key_exists('required', $option) && $option['required'] == true) {
                    $output .= " [required]";
                }
                $output .= PHP_EOL;
                echo $output;
            }
            echo "\t" . $this->helpOption . PHP_EOL;
        } else {
            echo PHP_EOL;
        }
    }
public function outputHelp($short = false)
    {
        echo "Usage: " . $this->getName() . " ";
        if (!empty($this->params)) {
            foreach ($this->params as $param) {
                if ($param['required'] == true) {
                    echo '<' . $param['name'] . '> ';
                } else {
                    echo '[' . $param['name'] . '] ';
                }
            }
        }
        echo "[options]";

        if (!$short) {
            echo PHP_EOL . PHP_EOL;

            if (!empty($this->params)) {
                echo "Parameters:" . PHP_EOL;
                foreach ($this->params as $param) {
                    echo "\t" . $param['help'] . PHP_EOL;
                }
                echo PHP_EOL;
            }

            echo "Options:" . PHP_EOL;
            foreach ($this->options as $option) {
                $output = "\t" . $option['help'];
                if (array_key_exists('required', $option) && $option['required'] == true) {
                    $output .= " [required]";
                }
                $output .= PHP_EOL;
                echo $output;
            }
            echo "\t" . $this->helpOption . PHP_EOL;
        } else {
            echo PHP_EOL;
        }
    }
public function outputHelp ( $ short = false ) { echo "Usage: " . $ this -> getName ( ) . " " ; if ( ! empty ( $ this -> params ) ) { foreach ( $ this -> params as $ param ) { if ( $ param [ 'required' ] == true ) { echo '<' . $ param [ 'name' ] . '> ' ; } else { echo '[' . $ param [ 'name' ] . '] ' ; } } } echo "[options]" ; if ( ! $ short ) { echo PHP_EOL . PHP_EOL ; if ( ! empty ( $ this -> params ) ) { echo "Parameters:" . PHP_EOL ; foreach ( $ this -> params as $ param ) { echo "\t" . $ param [ 'help' ] . PHP_EOL ; } echo PHP_EOL ; } echo "Options:" . PHP_EOL ; foreach ( $ this -> options as $ option ) { $ output = "\t" . $ option [ 'help' ] ; if ( array_key_exists ( 'required' , $ option ) && $ option [ 'required' ] == true ) { $ output .= " [required]" ; } $ output .= PHP_EOL ; echo $ output ; } echo "\t" . $ this -> helpOption . PHP_EOL ; } else { echo PHP_EOL ; } }
Output help text

Format:

Usage: {{name}} <param> [options]

Options:
-p, --peppers Add peppers
-c, --cheese [type] Add a cheese
-m, --mayo Add mayonaise
-h, --help Output usage information

@param bool $short - if true, short output text
Output help text