MediaWiki master
Wikimedia\Message\MessageParam Class Reference

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

Inherits JsonCodecable.

Inherited by Wikimedia\Message\ListParam, and Wikimedia\Message\ScalarParam.

Collaboration diagram for Wikimedia\Message\MessageParam:

Public Member Functions

 __wakeup ()
 
 dump ()
 Dump the object for testing/debugging.
 
 getType ()
 Get the type of the parameter.
 
 getValue ()
 Get the input value of the parameter.
 
 isSameAs (MessageParam $mp)
 Equality testing.
 

Static Public Member Functions

static hint ()
 If you are serializing a MessageParam, use this JsonCodec hint to suppress unnecessary type information.
 
static jsonClassHintFor (string $keyName)
 
static newFromJsonArray (array $json)
 

Protected Attributes

ParamType $type
 
mixed $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.

Definition at line 14 of file MessageParam.php.

Member Function Documentation

◆ __wakeup()

Wikimedia\Message\MessageParam::__wakeup ( )

Reimplemented in Wikimedia\Message\ListParam.

Definition at line 84 of file MessageParam.php.

◆ dump()

Wikimedia\Message\MessageParam::dump ( )
abstract

Dump the object for testing/debugging.

Returns
string

Reimplemented in Wikimedia\Message\ListParam, and Wikimedia\Message\ScalarParam.

◆ getType()

Wikimedia\Message\MessageParam::getType ( )

Get the type of the parameter.

Returns
ParamType One of the ParamType constants

Definition at line 29 of file MessageParam.php.

Referenced by MediaWiki\Message\Message\formatListParam(), and MediaWiki\Message\Message\params().

◆ getValue()

Wikimedia\Message\MessageParam::getValue ( )

Get the input value of the parameter.

Returns
mixed

Definition at line 38 of file MessageParam.php.

◆ hint()

static Wikimedia\Message\MessageParam::hint ( )
static

If you are serializing a MessageParam, use this JsonCodec hint to suppress unnecessary type information.

Definition at line 80 of file MessageParam.php.

◆ isSameAs()

Wikimedia\Message\MessageParam::isSameAs ( MessageParam $mp)
abstract

Equality testing.

Reimplemented in Wikimedia\Message\ListParam, and Wikimedia\Message\ScalarParam.

◆ jsonClassHintFor()

static Wikimedia\Message\MessageParam::jsonClassHintFor ( string $keyName)
static

◆ newFromJsonArray()

static Wikimedia\Message\MessageParam::newFromJsonArray ( array $json)
static

Member Data Documentation

◆ $type

ParamType Wikimedia\Message\MessageParam::$type
protected

Definition at line 20 of file MessageParam.php.

Referenced by Wikimedia\Message\ScalarParam\__construct().

◆ $value

mixed Wikimedia\Message\MessageParam::$value
protected

Definition at line 22 of file MessageParam.php.

Referenced by Wikimedia\Message\ScalarParam\__construct().


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