OptionsResolver

OptionsResolver

class OptionsResolver implements Options

Validates options and merges them with default values.

Methods

$this setDefault(string $option, mixed $value)

Sets the default value of a given option.

$this setDefaults(array $defaults)

Sets a list of default values.

bool hasDefault(string $option)

Returns whether a default value is set for an option.

$this setRequired(string|string[] $optionNames)

Marks one or more options as required.登录查看完整内容