ArrayChoiceList

ArrayChoiceList

class ArrayChoiceList implements ChoiceListInterface

A list of choices with arbitrary data types.

The user of this class is responsible for assigning string values to the choices. Both the choices and their values are passed to the constructor. Each choice must have a corresponding value (with the same array key) in the value array.

Methods

登录查看完整内容
__construct(array|Traversable $choices, callable $value = null)

Creates a list with the given choices and values.