mediatekformation

CachingFactoryDecorator
in package
implements ChoiceListFactoryInterface, ResetInterface

Caches the choice lists created by the decorated factory.

Tags
author

Bernhard Schussek bschussek@gmail.com

Interfaces, Classes, Traits and Enums

ChoiceListFactoryInterface
Creates {@link ChoiceListInterface} instances.
ResetInterface
Provides a way to reset an object to its initial state.

Table of Contents

$decoratedFactory  : mixed
$lists  : array<string|int, ChoiceListInterface>
$views  : array<string|int, ChoiceListView>
__construct()  : mixed
createListFromChoices()  : ChoiceListInterface
Creates a choice list for the given choices.
createListFromLoader()  : ChoiceListInterface
Creates a choice list that is loaded with the given loader.
createView()  : ChoiceListView
Creates a view for the given choice list.
getDecoratedFactory()  : ChoiceListFactoryInterface
Returns the decorated factory.
reset()  : mixed

Properties

Methods

createListFromChoices()

Creates a choice list for the given choices.

public createListFromChoices(mixed $choices[, mixed $value = null ]) : ChoiceListInterface
Parameters
$choices : mixed

The choices

$value : mixed = null

The callable generating the choice values

Return values
ChoiceListInterface

The choice list

createView()

Creates a view for the given choice list.

public createView(ChoiceListInterface $list[, mixed $preferredChoices = null ][, mixed $label = null ][, mixed $index = null ][, mixed $groupBy = null ][, mixed $attr = null ]) : ChoiceListView
Parameters
$list : ChoiceListInterface
$preferredChoices : mixed = null

The preferred choices

$label : mixed = null

The callable generating the choice labels; pass false to discard the label

$index : mixed = null

The callable generating the view indices

$groupBy : mixed = null

The callable generating the group names

$attr : mixed = null

The callable generating the HTML attributes

Return values
ChoiceListView

The choice list view

Search results