Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
Wikibase\Lib\Normalization\CompositeDataValueNormalizer Class Reference

A data value normalizer applying a list of other normalizations in order. More...

+ Inheritance diagram for Wikibase\Lib\Normalization\CompositeDataValueNormalizer:
+ Collaboration diagram for Wikibase\Lib\Normalization\CompositeDataValueNormalizer:

Public Member Functions

 __construct (array $normalizers)
 
 normalize (DataValue $value)
 Normalize the given value.
 

Private Attributes

 $normalizers
 

Detailed Description

A data value normalizer applying a list of other normalizations in order.

With an empty list of normalizations, this doubles as a no-op normalizer.

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Lib\Normalization\CompositeDataValueNormalizer::__construct ( array $normalizers)
Parameters
DataValueNormalizer[]$normalizers

Member Function Documentation

◆ normalize()

Wikibase\Lib\Normalization\CompositeDataValueNormalizer::normalize ( DataValue $value)

Normalize the given value.

Parameters
DataValue$valueThe value to normalize. Every implementation must be able to handle every data value type without error, even if it’s just by returning the same value without modification.
Returns
DataValue A normalized version of the value. If the input value was not normalized, this must be a new object, since data values are immutable; if it was already normalized, this may be a new object or the same instance.

Implements Wikibase\Lib\Normalization\DataValueNormalizer.

Member Data Documentation

◆ $normalizers

Wikibase\Lib\Normalization\CompositeDataValueNormalizer::$normalizers
private

The documentation for this class was generated from the following file: