42 '@phan-var PPFrame_Hash $parent';
49 $this->titleCache =
$parent->titleCache;
50 $this->titleCache[] = $pdbk;
51 $this->loopCheckHash =
$parent->loopCheckHash;
52 if ( $pdbk !==
false ) {
53 $this->loopCheckHash[$pdbk] =
true;
55 $this->depth =
$parent->depth + 1;
56 $this->numberedExpansionCache = $this->namedExpansionCache = [];
63 foreach ( $args as $name => $value ) {
69 $s .=
"\"$name\":\"" .
70 str_replace(
'"',
'\\"', $value->__toString() ) .
'"';
83 if ( isset( $this->parent->childExpansionCache[$key] ) ) {
84 return $this->parent->childExpansionCache[$key];
86 $retval = $this->
expand( $root, $flags );
88 $this->parent->childExpansionCache[$key] = $retval;
99 return !count( $this->numberedArgs ) && !count( $this->namedArgs );
107 foreach ( array_merge(
108 array_keys( $this->numberedArgs ),
109 array_keys( $this->namedArgs ) ) as $key ) {
120 foreach ( $this->numberedArgs as $key => $_ ) {
131 foreach ( $this->namedArgs as $key => $_ ) {
142 if ( !isset( $this->numberedArgs[$index] ) ) {
145 if ( !isset( $this->numberedExpansionCache[$index] ) ) {
146 # No trimming for unnamed arguments
147 $this->numberedExpansionCache[$index] = $this->parent->expand(
148 $this->numberedArgs[$index],
152 return $this->numberedExpansionCache[$index];
160 if ( !isset( $this->namedArgs[$name] ) ) {
163 if ( !isset( $this->namedExpansionCache[$name] ) ) {
164 # Trim named arguments post-expand, for backwards compatibility
165 $this->namedExpansionCache[$name] = trim(
168 return $this->namedExpansionCache[$name];
177 if ( $text ===
false ) {
194 parent::setVolatile( $flag );
195 $this->parent->setVolatile( $flag );
201 parent::setTTL( $ttl );
202 $this->parent->setTTL( $ttl );
207class_alias( PPTemplateFrame_Hash::class,
'PPTemplateFrame_Hash' );
wfDeprecated( $function, $version=false, $component=false, $callerOffset=2)
Logs a warning that a deprecated feature was used.