Documentation

Parser
in package

FinalYes

Table of Contents

Methods

parse()  : array<string|int, mixed>
parseLongOption()  : void
parseShortOption()  : void

Methods

parse()

public parse(array<string|int, mixed> $argv, string $shortOptions[, array<string|int, mixed>|null $longOptions = null ]) : array<string|int, mixed>
Parameters
$argv : array<string|int, mixed>
$shortOptions : string
$longOptions : array<string|int, mixed>|null = null
Tags
psalm-param

list $argv

psalm-param

list $longOptions

psalm-return

array{0: array, 1: array}

throws
AmbiguousOptionException
throws
OptionDoesNotAllowArgumentException
throws
RequiredOptionArgumentMissingException
throws
UnknownOptionException
Return values
array<string|int, mixed>

parseLongOption()

private parseLongOption(string $argument, array<string|int, mixed> $longOptions, array<string|int, mixed> &$options, array<string|int, mixed> &$argv) : void
Parameters
$argument : string
$longOptions : array<string|int, mixed>
$options : array<string|int, mixed>
$argv : array<string|int, mixed>
Tags
psalm-param

list $longOptions

throws
AmbiguousOptionException
throws
OptionDoesNotAllowArgumentException
throws
RequiredOptionArgumentMissingException
throws
UnknownOptionException

parseShortOption()

private parseShortOption(string $argument, string $shortOptions, array<string|int, mixed> &$options, array<string|int, mixed> &$argv) : void
Parameters
$argument : string
$shortOptions : string
$options : array<string|int, mixed>
$argv : array<string|int, mixed>
Tags
throws
RequiredOptionArgumentMissingException

        
On this page

Search results