Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F4029357
PPNode_Hash_Text.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
PPNode_Hash_Text.php
View Options
<?php
/**
* @license GPL-2.0-or-later
* @file
* @ingroup Parser
*/
namespace
MediaWiki\Parser
;
use
InvalidArgumentException
;
use
LogicException
;
use
Stringable
;
/**
* @ingroup Parser
*/
// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
class
PPNode_Hash_Text
implements
Stringable
,
PPNode
{
/** @var string */
public
$value
;
/** @var array */
private
$store
;
/** @var int */
private
$index
;
/**
* Construct an object using the data from $store[$index]. The rest of the
* store array can be accessed via getNextSibling().
*
* @param array $store
* @param int $index
*/
public
function
__construct
(
array
$store
,
$index
)
{
if
(
!
is_scalar
(
$store
[
$index
]
)
)
{
throw
new
InvalidArgumentException
(
__CLASS__
.
' given object instead of string'
);
}
$this
->
value
=
$store
[
$index
];
$this
->
store
=
$store
;
$this
->
index
=
$index
;
}
public
function
__toString
()
{
return
htmlspecialchars
(
$this
->
value
,
ENT_COMPAT
);
}
/** @inheritDoc */
public
function
getNextSibling
()
{
return
PPNode_Hash_Tree
::
factory
(
$this
->
store
,
$this
->
index
+
1
);
}
/** @inheritDoc */
public
function
getChildren
()
{
return
false
;
}
/** @inheritDoc */
public
function
getFirstChild
()
{
return
false
;
}
/** @inheritDoc */
public
function
getChildrenOfType
(
$name
)
{
return
false
;
}
/** @inheritDoc */
public
function
getLength
()
{
return
false
;
}
/** @inheritDoc */
public
function
item
(
$i
)
{
return
false
;
}
/** @inheritDoc */
public
function
getName
()
{
return
'#text'
;
}
/** @inheritDoc */
public
function
splitArg
()
{
// @phan-suppress-previous-line PhanPluginNeverReturnMethod
throw
new
LogicException
(
__METHOD__
.
': not supported'
);
}
/** @inheritDoc */
public
function
splitExt
()
{
// @phan-suppress-previous-line PhanPluginNeverReturnMethod
throw
new
LogicException
(
__METHOD__
.
': not supported'
);
}
/** @inheritDoc */
public
function
splitHeading
()
{
// @phan-suppress-previous-line PhanPluginNeverReturnMethod
throw
new
LogicException
(
__METHOD__
.
': not supported'
);
}
}
/** @deprecated class alias since 1.43 */
class_alias
(
PPNode_Hash_Text
::
class
,
'PPNode_Hash_Text'
);
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Aug 14 2026, 22:03 (12 w, 6 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
d4/31/24fa5c3e9343b3a77cf5326e2ae8
Default Alt Text
PPNode_Hash_Text.php (2 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment