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

Class: Console_CommandLine_Action

Source Location: /Console_CommandLine-1.0.0/CommandLine/Action.php

Class Overview


F Class that represent an option action.


Author(s):

Version:

  • Release: 1.0.0

Copyright:

  • 2007 David JEAN LOUIS

Variables

Methods


Child classes:

Console_CommandLine_Action_StoreInt
Class that represent the StoreInt action.
Console_CommandLine_Action_StoreFalse
Class that represent the StoreFalse action.
Console_CommandLine_Action_Callback
Class that represent the Callback action.
Console_CommandLine_Action_StoreFloat
Class that represent the StoreFloat action.
Console_CommandLine_Action_Counter
Class that represent the Version action.
Console_CommandLine_Action_Help
Class that represent the Help action, a special action that displays the help message, telling the user how to use the program.
Console_CommandLine_Action_Password
Class that represent the Password action, a special action that allow the user to specify the password on the commandline or to be prompted for entering it.
Console_CommandLine_Action_StoreTrue
Class that represent the StoreTrue action.
Console_CommandLine_Action_StoreString
Class that represent the StoreString action.
Console_CommandLine_Action_StoreArray
Class that represent the StoreArray action.
Console_CommandLine_Action_Version
Class that represent the Version action, a special action that displays the version string of the program.

Inherited Variables

Inherited Methods


Class Details

[line 38]
F Class that represent an option action.


[ Top ]


Class Variables

$option =

[line 56]

A reference to the option instance.
  • Access: protected



[ Top ]

$parser =

[line 64]

A reference to the parser instance.
  • Access: protected



[ Top ]

$result =

[line 48]

A reference to the result instance.
  • Access: protected



[ Top ]



Method Detail

__construct (Constructor)   [line 78]

Console_CommandLine_Action __construct( object $result, object $option, object $parser)

Constructor
  • Access: public

Parameters:

object   $result   —  a Console_CommandLine_Result instance
object   $option   —  a Console_CommandLine_Option instance
object   $parser   —  a Console_CommandLine instance

[ Top ]

execute   [line 131]

string execute( [mixed $value = false], [array $params = array()])

Execute the action with the value entered by the user.
  • Abstract:
  • Access: public

Overridden in child classes as:

Console_CommandLine_Action_StoreInt::execute()
Execute the action with the value entered by the user.
Console_CommandLine_Action_StoreFalse::execute()
Execute the action with the value entered by the user.
Console_CommandLine_Action_Callback::execute()
Execute the action with the value entered by the user.
Console_CommandLine_Action_StoreFloat::execute()
Execute the action with the value entered by the user.
Console_CommandLine_Action_Counter::execute()
Execute the action with the value entered by the user.
Console_CommandLine_Action_Help::execute()
Execute the action with the value entered by the user.
Console_CommandLine_Action_Password::execute()
Execute the action with the value entered by the user.
Console_CommandLine_Action_StoreTrue::execute()
Execute the action with the value entered by the user.
Console_CommandLine_Action_StoreString::execute()
Execute the action with the value entered by the user.
Console_CommandLine_Action_StoreArray::execute()
Execute the action with the value entered by the user.
Console_CommandLine_Action_Version::execute()
Execute the action with the value entered by the user.

Parameters:

mixed   $value   —  the option value
array   $params   —  an optional array of parameters

[ Top ]

getResult   [line 94]

mixed getResult( )

Convenience method to retrieve the value of result->options[name].
  • Return: the assigned value or null
  • Access: public

[ Top ]

setResult   [line 113]

void setResult( mixed $result)

Convenience method to assign the result->options[name] value.
  • Access: public

Parameters:

mixed   $result   —  the option value

[ Top ]


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