Overview

Namespaces

  • Webmozart
    • Console
      • Adapter
      • Api
        • Application
        • Args
          • Format
        • Command
        • Config
        • Event
        • Formatter
        • IO
        • Resolver
      • Args
      • Config
      • Formatter
      • Handler
        • Help
      • IO
        • InputStream
        • OutputStream
      • Process
      • Resolver
      • UI
        • Alignment
        • Component
        • Help
        • Layout
        • Style
      • Util

Classes

  • AbstractHelp
  • ApplicationHelp
  • CommandHelp
  • Overview
  • Namespace
  • Class

Class AbstractHelp

Base class for rendering help pages.

Webmozart\Console\UI\Help\AbstractHelp implements Webmozart\Console\UI\Component

Direct known subclasses

Webmozart\Console\UI\Help\ApplicationHelp, Webmozart\Console\UI\Help\CommandHelp
Abstract
Namespace: Webmozart\Console\UI\Help
Author: Bernhard Schussek bschussek@gmail.com
Since: 1.0
Located at UI/Help/AbstractHelp.php
Methods summary
public
# render( Webmozart\Console\Api\IO\IO $io, integer $indentation = 0 )

Renders the usage.

Renders the usage.

Parameters

$io
The I/O.
$indentation
The number of spaces to indent.

Implementation of

Webmozart\Console\UI\Component::render()
abstract protected
# renderHelp( Webmozart\Console\UI\Layout\BlockLayout $layout )

Renders the usage.

Renders the usage.

Overwrite this class in your sub-classes to implement the actual rendering.

Parameters

$layout
The layout.
protected
# renderArguments( Webmozart\Console\UI\Layout\BlockLayout $layout, array $arguments )

Renders a list of arguments.

Renders a list of arguments.

Parameters

$layout
The layout.
$arguments
The arguments to render.
protected
# renderArgument( Webmozart\Console\UI\Layout\BlockLayout $layout, Webmozart\Console\Api\Args\Format\Argument $argument )

Renders an argument.

Renders an argument.

Parameters

$layout
The layout.
$argument
The argument to render.
protected
# renderOptions( Webmozart\Console\UI\Layout\BlockLayout $layout, array $options )

Renders a list of options.

Renders a list of options.

Parameters

$layout
The layout.
$options
The options to render.
protected
# renderGlobalOptions( Webmozart\Console\UI\Layout\BlockLayout $layout, array $options )

Renders a list of global options.

Renders a list of global options.

Parameters

$layout
The layout.
$options
The global options to render.
protected
# renderOption( Webmozart\Console\UI\Layout\BlockLayout $layout, Webmozart\Console\Api\Args\Format\Option $option )

Renders an option.

Renders an option.

Parameters

$layout
The layout.
$option
The option to render.
protected
# renderSynopsis( Webmozart\Console\UI\Layout\BlockLayout $layout, Webmozart\Console\Api\Args\Format\ArgsFormat $argsFormat, string $appName, string $prefix = '', boolean $lastOptional = false )

Renders the synopsis of a console command.

Renders the synopsis of a console command.

Parameters

$layout
The layout.
$argsFormat
The console arguments to render.
$appName
The name of the application binary.
$prefix
The prefix to insert.
$lastOptional

Set to true if the last command of the console arguments is optional. This command will be enclosed in brackets in the output.

protected string
# formatValue( mixed $value )

Formats the default value of an argument or an option.

Formats the default value of an argument or an option.

Parameters

$value
The default value to format.

Returns

string
The formatted value.
Webmozart Console API API documentation generated by ApiGen