52 '@phan-var PPFrame_Hash $parent';
59 $this->titleCache =
$parent->titleCache;
60 $this->titleCache[] = $pdbk;
61 $this->loopCheckHash =
$parent->loopCheckHash;
62 if ( $pdbk !==
false ) {
63 $this->loopCheckHash[$pdbk] =
true;
65 $this->depth =
$parent->depth + 1;
66 $this->numberedExpansionCache = $this->namedExpansionCache = [];
73 foreach (
$args as $name => $value ) {
79 $s .=
"\"$name\":\"" .
80 str_replace(
'"',
'\\"', $value->__toString() ) .
'"';
94 if ( isset( $this->parent->childExpansionCache[$key] ) ) {
95 return $this->parent->childExpansionCache[$key];
97 $retval = $this->
expand( $root, $flags );
99 $this->parent->childExpansionCache[$key] = $retval;
110 return !count( $this->numberedArgs ) && !count( $this->namedArgs );
118 foreach ( array_merge(
119 array_keys( $this->numberedArgs ),
120 array_keys( $this->namedArgs ) ) as $key ) {
131 foreach ( array_keys( $this->numberedArgs ) as $key ) {
142 foreach ( array_keys( $this->namedArgs ) as $key ) {
153 if ( !isset( $this->numberedArgs[$index] ) ) {
156 if ( !isset( $this->numberedExpansionCache[$index] ) ) {
157 # No trimming for unnamed arguments
158 $this->numberedExpansionCache[$index] = $this->parent->expand(
159 $this->numberedArgs[$index],
163 return $this->numberedExpansionCache[$index];
171 if ( !isset( $this->namedArgs[$name] ) ) {
174 if ( !isset( $this->namedExpansionCache[$name] ) ) {
175 # Trim named arguments post-expand, for backwards compatibility
176 $this->namedExpansionCache[$name] = trim(
180 return $this->namedExpansionCache[$name];
189 if ( $text ===
false ) {
205 parent::setVolatile( $flag );
206 $this->parent->setVolatile( $flag );
210 parent::setTTL(
$ttl );
211 $this->parent->setTTL(
$ttl );
An expansion frame, used as a context to expand the result of preprocessToObj()
Preprocessor $preprocessor
isVolatile()
Get the volatile flag.
Expansion frame with template arguments.
getNumberedArgument( $index)
cachedExpand( $key, $root, $flags=0)
array $numberedExpansionCache
isEmpty()
Returns true if there are no arguments in this frame.
array $namedExpansionCache
isTemplate()
Return true if the frame is a template frame.
setVolatile( $flag=true)
Set the volatile flag.
__construct( $preprocessor, $parent=false, $numberedArgs=[], $namedArgs=[], $title=false)
getPrefixedDBkey()
Get the prefixed database key form.
foreach( $mmfl['setupFiles'] as $fileName) if($queue) if(empty( $mmfl['quiet'])) $s