Console_CommandLine
[ class tree: Console_CommandLine ] [ index: Console_CommandLine ] [ all elements ]

Class: Console_CommandLine_Renderer_Default

Source Location: /Console_CommandLine-1.0.0RC3/CommandLine/Renderer/Default.php

Class Overview


Console_CommandLine default renderer.


Author(s):

Version:

  • Release: 1.0.0RC3

Copyright:

  • 2007 David JEAN LOUIS

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 41]
Console_CommandLine default renderer.


[ Top ]


Class Variables

$line_width =  75

[line 51]

integer that define the max width of the help text
  • Access: public

Type:   integer


[ Top ]

$parser =  false

[line 59]

An instance of Console_CommandLine
  • Access: protected



[ Top ]



Method Detail

__construct (Constructor)   [line 71]

Console_CommandLine_Renderer_Default __construct( object $parser)

Constructor.
  • Access: public

Parameters:

object   $parser   —  a Console_CommandLine instance

[ Top ]

argumentList   [line 252]

string argumentList( )

Render the arguments list that will be displayed to the user, you can override this method if you want to change the look of the list.
  • Return: the formatted argument list
  • Access: protected

[ Top ]

columnWrap   [line 368]

string columnWrap( string $text, int $cw)

Wraps the text passed to the method at the specified width.
  • Access: protected

Parameters:

string   $text   —  the text to wrap
int   $cw   —  the wrap width

[ Top ]

commandList   [line 312]

string commandList( )

Render the command list that will be displayed to the user, you can override this method if you want to change the look of the list.
  • Return: the formatted subcommand list
  • Access: protected

[ Top ]

commandUsageLine   [line 226]

string commandUsageLine( )

Return the command line usage message for subcommands
  • Access: protected

[ Top ]

description   [line 186]

string description( )

Return the command line description message
  • Return: the usage message
  • Access: protected

[ Top ]

error   [line 118]

string error( string $error)

Return a formatted error message
  • Return: the error string
  • Access: public

Parameters:

string   $error   —  the error message to format

[ Top ]

name   [line 159]

string name( )

return the full name of the program or the sub command
  • Access: protected

[ Top ]

optionList   [line 282]

string optionList( )

Render the options list that will be displayed to the user, you can override this method if you want to change the look of the list.
  • Return: the formatted option list
  • Access: protected

[ Top ]

usage   [line 85]

string usage( )

Return the full usage message
  • Return: the usage message
  • Access: public

[ Top ]

usageLine   [line 200]

string usageLine( )

Return the command line usage message
  • Return: the usage message
  • Access: protected

[ Top ]

version   [line 142]

string version( )

Return the program version string
  • Return: the version string
  • Access: public

[ Top ]

wrap   [line 345]

string wrap( string $text, [int $lw = null])

Wraps the text passed to the method.
  • Access: protected

Parameters:

string   $text   —  The text to wrap
int   $lw   —  The column width. Defaults to line_width property.

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:17:13 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.