protected function expandStringProperties(
        $data,
        $parent_keys,
        $reference_data,
        $value,
        $key
    ) {
        // We loop through all placeholders in a given string.
        // E.g., '${placeholder1} ${placeholder2}' requires two replacements.
        while (strpos($value, '${') !== false) {
            $original_value = $value;
            $value = preg_replace_callback(
                '/\$\{([^\$}]+)\}/',
                function ($matches) use ($data, $reference_data) {
                    return $this->expandStringPropertiesCallback(
                        $matches,
                        $data,
                        $reference_data
                    );
                },
                $value
            );

            // If no replacement occurred at all, break to prevent
            // infinite loop.
            if ($original_value == $value) {
                break;
            }

            // Set value on $data object.
            if ($parent_keys) {
                $full_key = $parent_keys . "$key";
            } else {
                $full_key = $key;
            }
            $data->set($full_key, $value);
        }
        return $value;
    }
protected function expandStringProperties(
        $data,
        $parent_keys,
        $reference_data,
        $value,
        $key
    ) {
        // We loop through all placeholders in a given string.
        // E.g., '${placeholder1} ${placeholder2}' requires two replacements.
        while (strpos($value, '${') !== false) {
            $original_value = $value;
            $value = preg_replace_callback(
                '/\$\{([^\$}]+)\}/',
                function ($matches) use ($data, $reference_data) {
                    return $this->expandStringPropertiesCallback(
                        $matches,
                        $data,
                        $reference_data
                    );
                },
                $value
            );

            // If no replacement occurred at all, break to prevent
            // infinite loop.
            if ($original_value == $value) {
                break;
            }

            // Set value on $data object.
            if ($parent_keys) {
                $full_key = $parent_keys . "$key";
            } else {
                $full_key = $key;
            }
            $data->set($full_key, $value);
        }
        return $value;
    }
protected function expandStringProperties ( $ data , $ parent_keys , $ reference_data , $ value , $ key ) { // We loop through all placeholders in a given string. // E.g., '${placeholder1} ${placeholder2}' requires two replacements. while ( strpos ( $ value , '${' ) !== false ) { $ original_value = $ value ; $ value = preg_replace_callback ( '/\$\{([^\$}]+)\}/' , function ( $ matches ) use ( $ data , $ reference_data ) { return $ this -> expandStringPropertiesCallback ( $ matches , $ data , $ reference_data ) ; } , $ value ) ; // If no replacement occurred at all, break to prevent // infinite loop. if ( $ original_value == $ value ) { break ; } // Set value on $data object. if ( $ parent_keys ) { $ full_key = $ parent_keys . "$key" ; } else { $ full_key = $ key ; } $ data -> set ( $ full_key , $ value ) ; } return $ value ; }
Expand a single property.

@param Data $data
A data object, containing the $array.
@param string $parent_keys
The parent keys of the current key in dot notation. This is used to
track the absolute path to the current key in recursive cases.
@param Data|null $reference_data
A reference data object. This is not operated upon but is used as a
reference to provide supplemental values for property expansion.
@param string $value
The unexpanded property value.
@param string $key
The immediate key of the property.

@return mixed
Expand a single property .