44 '@phan-var PPFrame_Hash $parent';
51 $this->titleCache =
$parent->titleCache;
52 $this->titleCache[] = $pdbk;
53 $this->loopCheckHash =
$parent->loopCheckHash;
54 if ( $pdbk !==
false ) {
55 $this->loopCheckHash[$pdbk] =
true;
57 $this->depth =
$parent->depth + 1;
58 $this->numberedExpansionCache = $this->namedExpansionCache = [];
65 foreach (
$args as $name => $value ) {
71 $s .=
"\"$name\":\"" .
72 str_replace(
'"',
'\\"', $value->__toString() ) .
'"';
86 if ( isset( $this->parent->childExpansionCache[$key] ) ) {
87 return $this->parent->childExpansionCache[$key];
89 $retval = $this->
expand( $root, $flags );
91 $this->parent->childExpansionCache[$key] = $retval;
102 return !count( $this->numberedArgs ) && !count( $this->namedArgs );
110 foreach ( array_merge(
111 array_keys( $this->numberedArgs ),
112 array_keys( $this->namedArgs ) ) as $key ) {
123 foreach ( array_keys( $this->numberedArgs ) as $key ) {
134 foreach ( array_keys( $this->namedArgs ) as $key ) {
145 if ( !isset( $this->numberedArgs[$index] ) ) {
148 if ( !isset( $this->numberedExpansionCache[$index] ) ) {
149 # No trimming for unnamed arguments
150 $this->numberedExpansionCache[$index] = $this->parent->expand(
151 $this->numberedArgs[$index],
155 return $this->numberedExpansionCache[$index];
163 if ( !isset( $this->namedArgs[$name] ) ) {
166 if ( !isset( $this->namedExpansionCache[$name] ) ) {
167 # Trim named arguments post-expand, for backwards compatibility
168 $this->namedExpansionCache[$name] = trim(
171 return $this->namedExpansionCache[$name];
180 if ( $text ===
false ) {
196 parent::setVolatile( $flag );
197 $this->parent->setVolatile( $flag );
201 parent::setTTL(
$ttl );
202 $this->parent->setTTL(
$ttl );