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

Public Member Functions

 __construct (Deserializer $dataValueDeserializer)
 
 newDataValue ( $dataValueType, $data)
 Constructs and returns a new DataValue of specified type with the provided data.
 
 newFromArray (array $data)
 Constructs a DataValue from its array representation.
 

Private Attributes

 $deserializer
 

Detailed Description

Author
Jeroen De Dauw < jeroe.nosp@m.nded.nosp@m.auw@g.nosp@m.mail.nosp@m..com >
Daniel Kinzler

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Lib\DataValueFactory::__construct ( Deserializer  $dataValueDeserializer)

Member Function Documentation

◆ newDataValue()

Wikibase\Lib\DataValueFactory::newDataValue (   $dataValueType,
  $data 
)

Constructs and returns a new DataValue of specified type with the provided data.

Parameters
string$dataValueType
mixed$data
Returns
DataValue
Exceptions
InvalidArgumentException

◆ newFromArray()

Wikibase\Lib\DataValueFactory::newFromArray ( array  $data)

Constructs a DataValue from its array representation.

This is what

See also
DataValue::toArray returns.
Parameters
array$data
Returns
DataValue
Exceptions
IllegalValueException

Member Data Documentation

◆ $deserializer

Wikibase\Lib\DataValueFactory::$deserializer
private

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