PHP 클래스 GetOptionKit\OptionParser

파일 보기 프로젝트 열기: c9s/getoptionkit 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$longOptions
$shortOptions
$specs

공개 메소드들

메소드 설명
__construct ( OptionCollection $specs )
parse ( array $argv ) : OptionResult | Option[]
setSpecs ( OptionCollection $specs )

보호된 메소드들

메소드 설명
consumeOptionToken ( Option $spec, $arg, $next, &$success = false ) : boolean consume option value from current argument or from the next argument
preprocessingArguments ( array $argv ) preprocess the argv array
pushOptionValue ( Option $spec, $arg, $next ) * push value to multipl value option

메소드 상세

__construct() 공개 메소드

public __construct ( OptionCollection $specs )
$specs OptionCollection

consumeOptionToken() 보호된 메소드

consume option value from current argument or from the next argument
protected consumeOptionToken ( Option $spec, $arg, $next, &$success = false ) : boolean
$spec Option
리턴 boolean next token consumed?

parse() 공개 메소드

public parse ( array $argv ) : OptionResult | Option[]
$argv array
리턴 OptionResult | Option[]

preprocessingArguments() 보호된 메소드

- split option and option value - separate arguments after "--"
protected preprocessingArguments ( array $argv )
$argv array

pushOptionValue() 보호된 메소드

* push value to multipl value option
protected pushOptionValue ( Option $spec, $arg, $next )
$spec Option

setSpecs() 공개 메소드

public setSpecs ( OptionCollection $specs )
$specs OptionCollection

프로퍼티 상세

$longOptions 공개적으로 프로퍼티

public $longOptions

$shortOptions 공개적으로 프로퍼티

public $shortOptions

$specs 공개적으로 프로퍼티

public $specs