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
Afficher le fichier Open project: phalcon/incubator

Méthodes publiques

Méthode 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 méthode

Gets the short option name.
public getShortName ( ) : string
Résultat string

getValueMode() public méthode

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

hasShortName() public méthode

Checks if the Option has default short name.
public hasShortName ( ) : boolean
Résultat boolean

isValueArray() public méthode

Checks if the Option can take multiple values.
public isValueArray ( ) : boolean
Résultat boolean

isValueOptional() public méthode

Checks if the Option takes an optional value.
public isValueOptional ( ) : boolean
Résultat boolean

isValueRequired() public méthode

Checks if the Option requires a value.
public isValueRequired ( ) : boolean
Résultat boolean

isValueUnacceptable() public méthode

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

setShortName() public méthode

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

setValueMode() public méthode

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