MediaWiki master
Wikimedia\Message\ScalarParam Class Reference

Value object representing a message parameter holding a single value. More...

Inherits Wikimedia\Message\MessageParam.

Collaboration diagram for Wikimedia\Message\ScalarParam:

Public Member Functions

 __construct ( $type, $value)
 Construct a text parameter.
 
 dump ()
 Dump the object for testing/debugging.
 
 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 (array $json)
 

Additional Inherited Members

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

Detailed Description

Value object representing a message parameter holding a single value.

Message parameter classes are pure value objects and are safely newable.

Stability: newable

Definition at line 16 of file ScalarParam.php.

Constructor & Destructor Documentation

◆ __construct()

Wikimedia\Message\ScalarParam::__construct ( $type,
$value )

Construct a text parameter.

Stability: stable
to call.
Parameters
string$typeOne of the ParamType constants.
string | int | float | MessageSpecifier | Stringable$value

Definition at line 27 of file ScalarParam.php.

References Wikimedia\Message\MessageParam\$type, Wikimedia\Message\MessageParam\$value, Wikimedia\Message\ParamType\cases(), Wikimedia\Message\ParamType\LIST, Wikimedia\Message\MessageValue\newFromSpecifier(), and wfDeprecatedMsg().

Member Function Documentation

◆ dump()

Wikimedia\Message\ScalarParam::dump ( )

Dump the object for testing/debugging.

Returns
string

Reimplemented from Wikimedia\Message\MessageParam.

Definition at line 60 of file ScalarParam.php.

◆ newFromJsonArray()

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

Definition at line 77 of file ScalarParam.php.

◆ toJsonArray()

Wikimedia\Message\ScalarParam::toJsonArray ( )

Definition at line 69 of file ScalarParam.php.


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