Wikibase
MediaWiki Wikibase extension
Wikibase\Repo\Parsers\WikibaseStringValueNormalizer Class Reference

Adapter implementing ValueParsers\Normalizers\StringNormalizer based on \Wikibase\Lib\StringNormalizer. More...

+ Inheritance diagram for Wikibase\Repo\Parsers\WikibaseStringValueNormalizer:
+ Collaboration diagram for Wikibase\Repo\Parsers\WikibaseStringValueNormalizer:

Public Member Functions

 __construct (WikibaseLibStringNormalizer $normalizer)
 
 normalize ( $value)
 Trims leading and trailing whitespace and performs unicode normalization by calling \Wikibase\Lib\StringNormalizer::trimToNFC(). More...
 

Private Attributes

 $normalizer
 

Detailed Description

Adapter implementing ValueParsers\Normalizers\StringNormalizer based on \Wikibase\Lib\StringNormalizer.

Used to perform string normalization in StringParser.

Author
Daniel Kinzler

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Repo\Parsers\WikibaseStringValueNormalizer::__construct ( WikibaseLibStringNormalizer  $normalizer)
Parameters
WikibaseLibStringNormalizer$normalizer

Member Function Documentation

◆ normalize()

Wikibase\Repo\Parsers\WikibaseStringValueNormalizer::normalize (   $value)

Trims leading and trailing whitespace and performs unicode normalization by calling \Wikibase\Lib\StringNormalizer::trimToNFC().

See also
StringNormalizer::normalize()
\Wikibase\Lib\StringNormalizer::trimToNFC()
Parameters
string$valuethe value to normalize
Exceptions
InvalidArgumentExceptionif $value is not a string
Returns
string the normalized value

Member Data Documentation

◆ $normalizer

Wikibase\Repo\Parsers\WikibaseStringValueNormalizer::$normalizer
private

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