MediaWiki master
Wikimedia\Message\ListParam Class Reference

Value object representing a message parameter that consists of a list of values. More...

Inherits Wikimedia\Message\MessageParam.

Collaboration diagram for Wikimedia\Message\ListParam:

Public Member Functions

 __construct ( $listType, array $elements)
 
 dump ()
 Dump the object for testing/debugging.
 
 getListType ()
 Get the type of the list.
 
 toJsonArray ()
 
- Public Member Functions inherited from Wikimedia\Message\MessageParam
 getType ()
 Get the type of the parameter.
 
 getValue ()
 Get the input value of the parameter.
 

Static Public Member Functions

static newFromJsonArray (JsonDeserializer $deserializer, array $json)
 Creates a new instance of the class and initialized it from the $json array.
 

Additional Inherited Members

- Protected Attributes inherited from Wikimedia\Message\MessageParam
 $type
 
 $value
 

Detailed Description

Value object representing a message parameter that consists of a list of values.

Message parameter classes are pure value objects and are newable and (de)serializable.

Stability: newable

Definition at line 15 of file ListParam.php.

Constructor & Destructor Documentation

◆ __construct()

Wikimedia\Message\ListParam::__construct ( $listType,
array $elements )
Stability: stable
to call.
Parameters
string$listTypeOne of the ListType constants.
(MessageParam|MessageValue|string|int|float)[]$elements Values in the list. Values that are not instances of MessageParam are wrapped using ParamType::TEXT.

Definition at line 25 of file ListParam.php.

References Wikimedia\Message\ParamType\LIST, and Wikimedia\Message\ParamType\TEXT.

Member Function Documentation

◆ dump()

Wikimedia\Message\ListParam::dump ( )

Dump the object for testing/debugging.

Returns
string

Reimplemented from Wikimedia\Message\MessageParam.

Definition at line 47 of file ListParam.php.

◆ getListType()

Wikimedia\Message\ListParam::getListType ( )

Get the type of the list.

Returns
string One of the ListType constants

Definition at line 43 of file ListParam.php.

◆ newFromJsonArray()

static Wikimedia\Message\ListParam::newFromJsonArray ( JsonDeserializer $deserializer,
array $json )
static

Creates a new instance of the class and initialized it from the $json array.

Parameters
JsonDeserializer$deserializeran instance of JsonDeserializer to use for nested properties if they need special care.
array$json
Returns
JsonDeserializable

Implements MediaWiki\Json\JsonDeserializable.

Definition at line 64 of file ListParam.php.

References Wikimedia\Message\ParamType\LIST.

◆ toJsonArray()

Wikimedia\Message\ListParam::toJsonArray ( )

Definition at line 55 of file ListParam.php.


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