|
| __construct (array $initialVals=[]) |
|
| isEmpty () |
| Returns true iff there are no dynamic properties of this object.
|
|
| getExtAttribs () |
| Helper method to facilitate renaming the 'attrs' property to 'extAttribs' (T367616).
|
|
| getExtAttrib (string $name) |
| Helper method to facilitate renaming the 'attrs' property to 'extAttribs' (T367616).
|
|
| setExtAttrib (string $name, $value) |
| Helper method to facilitate renaming the 'attrs' property to 'extAttribs' (T367616).
|
|
| __clone () |
|
| toJsonArray (JsonCodecInterface $codec) |
|
|
static | jsonClassHintFor (string $keyname) |
|
static | newFromJsonArray (JsonCodecInterface $codec, array $json) |
|
static | jsonClassCodec (JsonCodecInterface $codec, ContainerInterface $serviceContainer) |
| Custom JsonClassCodec for DataMw.
|
|
◆ getExtAttrib()
Wikimedia\Parsoid\NodeData\DataMw::getExtAttrib |
( |
string | $name | ) |
|
Helper method to facilitate renaming the 'attrs' property to 'extAttribs' (T367616).
- Parameters
-
- Returns
- string|array<Token|string>|null
◆ getExtAttribs()
Wikimedia\Parsoid\NodeData\DataMw::getExtAttribs |
( |
| ) |
|
Helper method to facilitate renaming the 'attrs' property to 'extAttribs' (T367616).
- Note
- that numeric key values will be converted from string to int by PHP when they are used as array keys
- Returns
- ?array<string|int,string|array<Token|string>>
◆ jsonClassCodec()
static Wikimedia\Parsoid\NodeData\DataMw::jsonClassCodec |
( |
JsonCodecInterface | $codec, |
|
|
ContainerInterface | $serviceContainer ) |
|
static |
Custom JsonClassCodec for DataMw.
Because the 'caption' field has an embedded DocumentFragment that /doesn't/ use the standard encoding, we need to use a custom class codec which allows us to manually encode the DocumentFragment (by passing the codec itself to the serialization/deserialization methods).
◆ setExtAttrib()
Wikimedia\Parsoid\NodeData\DataMw::setExtAttrib |
( |
string | $name, |
|
|
| $value ) |
Helper method to facilitate renaming the 'attrs' property to 'extAttribs' (T367616).
- Parameters
-
string | $name | |
| string|array<Token|string>|null | $value Setting to null will unset it from the array. |
The documentation for this class was generated from the following file: