55 $this->titleCache =
$parent->titleCache;
56 $this->titleCache[] = $pdbk;
57 $this->loopCheckHash =
$parent->loopCheckHash;
58 if ( $pdbk !==
false ) {
59 $this->loopCheckHash[$pdbk] =
true;
61 $this->depth =
$parent->depth + 1;
62 $this->numberedExpansionCache = $this->namedExpansionCache = [];
69 foreach (
$args as $name => $value ) {
75 $s .=
"\"$name\":\"" .
76 str_replace(
'"',
'\\"', $value->ownerDocument->saveXML( $value ) ) .
'"';
90 if ( isset( $this->parent->childExpansionCache[$key] ) ) {
91 return $this->parent->childExpansionCache[$key];
93 $retval = $this->
expand( $root, $flags );
95 $this->parent->childExpansionCache[$key] = $retval;
106 return !count( $this->numberedArgs ) && !count( $this->namedArgs );
111 foreach ( array_merge(
112 array_keys( $this->numberedArgs ),
113 array_keys( $this->namedArgs ) ) as $key ) {
121 foreach ( array_keys( $this->numberedArgs ) as $key ) {
129 foreach ( array_keys( $this->namedArgs ) as $key ) {
140 if ( !isset( $this->numberedArgs[$index] ) ) {
143 if ( !isset( $this->numberedExpansionCache[$index] ) ) {
144 # No trimming for unnamed arguments
145 $this->numberedExpansionCache[$index] = $this->parent->expand(
146 $this->numberedArgs[$index],
150 return $this->numberedExpansionCache[$index];
158 if ( !isset( $this->namedArgs[$name] ) ) {
161 if ( !isset( $this->namedExpansionCache[$name] ) ) {
162 # Trim named arguments post-expand, for backwards compatibility
163 $this->namedExpansionCache[$name] = trim(
166 return $this->namedExpansionCache[$name];
175 if ( $text ===
false ) {
191 parent::setVolatile( $flag );
192 $this->parent->setVolatile( $flag );
196 parent::setTTL(
$ttl );
197 $this->parent->setTTL(
$ttl );