DI\Definition\Source\DefinitionArray::replaceWildcards PHP Method

replaceWildcards() private method

Replaces all the wildcards in the string with the given replacements.
private replaceWildcards ( string $string, array $replacements ) : string
$string string
$replacements array
return string
    private function replaceWildcards($string, array $replacements)
    {
        foreach ($replacements as $replacement) {
            $pos = strpos($string, self::WILDCARD);
            if ($pos !== false) {
                $string = substr_replace($string, $replacement, $pos, 1);
            }
        }
        return $string;
    }