MediaWiki
fundraising/REL1_35
PPCustomFrame_Hash.php
Go to the documentation of this file.
1
<?php
26
// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
27
class
PPCustomFrame_Hash
extends
PPFrame_Hash
{
28
29
public
$args
;
30
31
public
function
__construct
(
$preprocessor
,
$args
) {
32
parent::__construct(
$preprocessor
);
33
$this->args =
$args
;
34
}
35
36
public
function
__toString
() {
37
$s
=
'cstmframe{'
;
38
$first =
true
;
39
foreach
( $this->args as $name => $value ) {
40
if
( $first ) {
41
$first =
false
;
42
}
else
{
43
$s
.=
', '
;
44
}
45
$s
.=
"\"$name\":\""
.
46
str_replace(
'"'
,
'\\"'
, $value->__toString() ) .
'"'
;
47
}
48
$s
.=
'}'
;
49
return
$s
;
50
}
51
55
public
function
isEmpty
() {
56
return
!count( $this->args );
57
}
58
63
public
function
getArgument
( $index ) {
64
return
$this->args[$index] ??
false
;
65
}
66
67
public
function
getArguments
() {
68
return
$this->args
;
69
}
70
}
PPCustomFrame_Hash
Expansion frame with custom arguments.
Definition
PPCustomFrame_Hash.php:27
PPCustomFrame_Hash\__toString
__toString()
Definition
PPCustomFrame_Hash.php:36
PPCustomFrame_Hash\$args
$args
Definition
PPCustomFrame_Hash.php:29
PPCustomFrame_Hash\isEmpty
isEmpty()
Definition
PPCustomFrame_Hash.php:55
PPCustomFrame_Hash\__construct
__construct( $preprocessor, $args)
Definition
PPCustomFrame_Hash.php:31
PPCustomFrame_Hash\getArgument
getArgument( $index)
Definition
PPCustomFrame_Hash.php:63
PPCustomFrame_Hash\getArguments
getArguments()
Definition
PPCustomFrame_Hash.php:67
PPFrame_Hash
An expansion frame, used as a context to expand the result of preprocessToObj()
Definition
PPFrame_Hash.php:27
PPFrame_Hash\$preprocessor
Preprocessor $preprocessor
Definition
PPFrame_Hash.php:37
$s
$s
Definition
mergeMessageFileList.php:185
includes
parser
PPCustomFrame_Hash.php
Generated on Mon Nov 25 2024 16:15:22 for MediaWiki by
1.10.0