PHP Interface Phalcon\Cli\Input\OptionInterface

This interface is meant to represent a command line option according to IEEE Std 1003.1, 2013 Edition and to provide methods for most common operations. Additional functionality for working with options can be provided on top of the interface (ParameterInterface) or externally. This interface includes properties for each of the following: - Option value type (unacceptable, optional, required, array)
Inheritance: extends Phalcon\Cli\Input\ParameterInterface
Show file Open project: phalcon/incubator

Public Methods

Method Description
getShortName ( ) : string Gets the short option name.
getValueMode ( ) : integer Gets the Option value mode (one of the VALUE_* constants).
hasShortName ( ) : boolean Checks if the Option has default short name.
isValueArray ( ) : boolean Checks if the Option can take multiple values.
isValueOptional ( ) : boolean Checks if the Option takes an optional value.
isValueRequired ( ) : boolean Checks if the Option requires a value.
isValueUnacceptable ( ) : boolean Checks if the Option shouldn't have a value.
setShortName ( string $name ) : Phalcon\Cli\Input\OptionInterface Gets the short Option name.
setValueMode ( integer $mode ) : Phalcon\Cli\Input\OptionInterface Sets the Option value mode (one of the VALUE_* constants).

Method Details

getShortName() public method

Gets the short option name.
public getShortName ( ) : string
return string

getValueMode() public method

Gets the Option value mode (one of the VALUE_* constants).
public getValueMode ( ) : integer
return integer

hasShortName() public method

Checks if the Option has default short name.
public hasShortName ( ) : boolean
return boolean

isValueArray() public method

Checks if the Option can take multiple values.
public isValueArray ( ) : boolean
return boolean

isValueOptional() public method

Checks if the Option takes an optional value.
public isValueOptional ( ) : boolean
return boolean

isValueRequired() public method

Checks if the Option requires a value.
public isValueRequired ( ) : boolean
return boolean

isValueUnacceptable() public method

Checks if the Option shouldn't have a value.
public isValueUnacceptable ( ) : boolean
return boolean

setShortName() public method

Gets the short Option name.
public setShortName ( string $name ) : Phalcon\Cli\Input\OptionInterface
$name string The short Option name.
return Phalcon\Cli\Input\OptionInterface

setValueMode() public method

Sets the Option value mode (one of the VALUE_* constants).
public setValueMode ( integer $mode ) : Phalcon\Cli\Input\OptionInterface
$mode integer The Option value mode.
return Phalcon\Cli\Input\OptionInterface