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

Class: Console_CommandLine_Renderer_Default

Source Location: /Console_CommandLine-1.2.0/Console/CommandLine/Renderer/Default.php

Class Overview


Console_CommandLine default renderer.


Author(s):

Version:

  • Release: 1.2.0

Copyright:

  • 2007 David JEAN LOUIS

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 42]
Console_CommandLine default renderer.


[ Top ]


Class Variables

$line_width =  75

[line 51]

Integer that define the max width of the help text.
  • Var: Line width
  • Access: public

Type:   integer


[ Top ]

$options_on_different_lines =  false

[line 58]

Integer that define the max width of the help text.
  • Var: Line width
  • Access: public

Type:   integer


[ Top ]

$parser =  false

[line 65]

An instance of Console_CommandLine.
  • Var: The parser
  • Access: public



[ Top ]



Method Detail

__construct (Constructor)   [line 77]

void __construct( [object $parser = false])

Constructor.
  • Access: public

Parameters:

object   $parser     A Console_CommandLine instance

[ Top ]

argumentList   [line 272]

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 408]

string columnWrap( string $text, int $cw)

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

Parameters:

string   $text     The text to wrap
int   $cw     The wrap width

[ Top ]

commandList   [line 344]

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 231]

string commandUsageLine( )

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

[ Top ]

description   [line 186]

string description( )

Returns the command line description message.
  • Return: The description message
  • Access: protected

[ Top ]

error   [line 122]

string error( string $error)

Returns a formatted error message.
  • Return: The error string
  • Access: public

Parameters:

string   $error     The error message to format

[ Top ]

name   [line 161]

string name( )

Returns the full name of the program or the sub command
  • Return: The name of the program
  • Access: protected

[ Top ]

optionList   [line 301]

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 90]

string usage( )

Returns the full usage message.
  • Return: The usage message
  • Access: public

[ Top ]

usageLine   [line 199]

string usageLine( )

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

[ Top ]

version   [line 145]

string version( )

Returns the program version string.
  • Return: The version string
  • Access: public

[ Top ]

wrap   [line 386]

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

Wraps the text passed to the method.
  • Return: The wrapped text
  • Access: protected

Parameters:

string   $text     The text to wrap
int   $lw     The column width (defaults to line_width property)

[ Top ]


Documentation generated on Thu, 25 Oct 2012 08:00:05 +0000 by phpDocumentor 1.4.3. PEAR Logo Copyright © PHP Group 2004.