Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F5952904
ChemWord.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
ChemWord.php
View Options
<?php
declare
(
strict_types
=
1
);
namespace
MediaWiki\Extension\Math\WikiTexVC\Nodes
;
use
MediaWiki\Extension\Math\WikiTexVC\MMLnodes\MMLmrow
;
use
MediaWiki\Extension\Math\WikiTexVC\MMLnodes\MMLmtext
;
class
ChemWord
extends
TexNode
{
/** @var TexNode */
public
$left
;
/** @var TexNode */
public
$right
;
public
function
__construct
(
TexNode
$left
,
TexNode
$right
)
{
parent
::
__construct
(
$left
,
$right
);
$this
->
left
=
$left
;
$this
->
right
=
$right
;
}
/**
* @return TexNode
*/
public
function
getLeft
():
TexNode
{
return
$this
->
left
;
}
/**
* @return TexNode
*/
public
function
getRight
():
TexNode
{
return
$this
->
right
;
}
/** @inheritDoc */
public
function
render
()
{
return
$this
->
left
->
render
()
.
$this
->
right
->
render
();
}
/** @inheritDoc */
public
function
renderMML
(
$arguments
=
[],
&
$state
=
[]
)
{
$mmlMrow
=
new
MMLmrow
();
$mtextLeft
=
new
MMLmtext
(
""
,
[
"mathcolor"
=>
"red"
]
);
$mtextRight
=
new
MMLmtext
();
// If right has empty literal content is resolved as dash
$right
=
$this
->
getRight
()->
getArgs
()[
0
]
==
""
?
"-"
:
$this
->
getRight
()->
renderMML
(
[],
$state
);
return
$mmlMrow
->
encapsulateRaw
(
$mmlMrow
->
encapsulateRaw
(
$mtextLeft
->
encapsulateRaw
(
$this
->
getLeft
()->
renderMML
(
[],
$state
)
)
.
$mtextRight
->
encapsulateRaw
(
$right
)
)
);
}
/** @inheritDoc */
public
function
extractIdentifiers
(
$args
=
null
)
{
return
[];
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Oct 3 2026, 01:47 (4 w, 3 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
b8/81/1370a5a098ce6cad7a60b5733067
Default Alt Text
ChemWord.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment