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


Classes:
Console_CommandLine
Console_CommandLine_Action
Console_CommandLine_Action_Callback
Console_CommandLine_Action_Counter
Console_CommandLine_Action_Help
Console_CommandLine_Action_Password
Console_CommandLine_Action_StoreArray
Console_CommandLine_Action_StoreFalse
Console_CommandLine_Action_StoreFloat
Console_CommandLine_Action_StoreInt
Console_CommandLine_Action_StoreString
Console_CommandLine_Action_StoreTrue
Console_CommandLine_Action_Version
Console_CommandLine_Argument
Console_CommandLine_Command
Console_CommandLine_Element
Console_CommandLine_Exception
Console_CommandLine_MessageProvider_Default
Console_CommandLine_Option
Console_CommandLine_Outputter_Default
Console_CommandLine_Renderer_Default
Console_CommandLine_Result
Console_CommandLine_XmlParser
Files:
Action.php
Argument.php
Callback.php
Command.php
CommandLine.php
Counter.php
Default.php
Default.php
Default.php
Element.php
ex1.php
ex2.php
Exception.php
Help.php
MessageProvider.php
Option.php
Outputter.php
Password.php
Renderer.php
Result.php
StoreArray.php
StoreFalse.php
StoreFloat.php
StoreInt.php
StoreString.php
StoreTrue.php
Version.php
XmlParser.php

Class: Console_CommandLine_Action_Counter

Source Location: /Console_CommandLine-1.0.2/CommandLine/Action/Counter.php

Class Overview

Console_CommandLine_Action
 |
 --Console_CommandLine_Action_Counter

Class that represent the Version action.


Author(s):

Version:

  • Release: 1.0.2

Copyright:

  • 2007 David JEAN LOUIS

Methods


Inherited Variables

Class: Console_CommandLine_Action

Console_CommandLine_Action::$option
Console_CommandLine_Action::$parser
Console_CommandLine_Action::$result

Inherited Methods

Class: Console_CommandLine_Action

Console_CommandLine_Action::__construct()
Constructor
Console_CommandLine_Action::execute()
Execute the action with the value entered by the user.
Console_CommandLine_Action::getResult()
Convenience method to retrieve the value of result->options[name].
Console_CommandLine_Action::setResult()
Convenience method to assign the result->options[name] value.

Class Details

[line 64]
Class that represent the Version action.

The execute methode add 1 to the value of the result option array entry. The value is incremented each time the option is found, for example with an option defined like that:

  1. $parser->addOption(
  2. 'verbose',
  3. array(
  4. 'short_name' => '-v',
  5. 'action' => 'Counter'
  6. )
  7. );
If the user type:
  1. $ script.php -v -v -v
or:
  1. $ script.php -vvv
the verbose variable will be set to to 3.



[ Top ]


Method Detail

execute [line 77]

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

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

Overrides Console_CommandLine_Action::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 ]


Documentation generated on 2019年3月11日 15:25:11 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.

AltStyle によって変換されたページ (->オリジナル) /