Documentation

OptionConfigurator
in package

FinalYes

Table of Contents

Properties

$name  : string
$resolver  : OptionsResolver

Methods

__construct()  : mixed
allowedTypes()  : $this
Adds allowed types for this option.
allowedValues()  : $this
Sets allowed values for this option.
default()  : $this
Sets the default value for this option.
define()  : self
Defines an option configurator with the given name.
deprecated()  : $this
Marks this option as deprecated.
ignoreUndefined()  : $this
Sets whether ignore undefined options.
info()  : $this
Sets an info message for an option.
normalize()  : $this
Sets the normalizer for this option.
required()  : $this
Marks this option as required.

Properties

Methods

allowedTypes()

Adds allowed types for this option.

public allowedTypes(string ...$types) : $this
Parameters
$types : string
Tags
throws
AccessException

If called from a lazy option or normalizer

Return values
$this

allowedValues()

Sets allowed values for this option.

public allowedValues(mixed ...$values) : $this
Parameters
$values : mixed

One or more acceptable values/closures

Tags
throws
AccessException

If called from a lazy option or normalizer

Return values
$this

default()

Sets the default value for this option.

public default(mixed $value) : $this
Parameters
$value : mixed
Tags
throws
AccessException

If called from a lazy option or normalizer

Return values
$this

define()

Defines an option configurator with the given name.

public define(string $option) : self
Parameters
$option : string
Return values
self

deprecated()

Marks this option as deprecated.

public deprecated(string $package, string $version[, string|Closure $message = 'The option "%name%" is deprecated.' ]) : $this
Parameters
$package : string

The name of the composer package that is triggering the deprecation

$version : string

The version of the package that introduced the deprecation

$message : string|Closure = 'The option "%name%" is deprecated.'

The deprecation message to use

Return values
$this

ignoreUndefined()

Sets whether ignore undefined options.

public ignoreUndefined([bool $ignore = true ]) : $this
Parameters
$ignore : bool = true
Return values
$this

info()

Sets an info message for an option.

public info(string $info) : $this
Parameters
$info : string
Tags
throws
AccessException

If called from a lazy option or normalizer

Return values
$this

normalize()

Sets the normalizer for this option.

public normalize(Closure $normalizer) : $this
Parameters
$normalizer : Closure
Tags
throws
AccessException

If called from a lazy option or normalizer

Return values
$this

required()

Marks this option as required.

public required() : $this
Tags
throws
AccessException

If called from a lazy option or normalizer

Return values
$this

        
On this page

Search results